mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-12 21:41:35 +08:00
gimple.h (gimple_set_in_transaction): Remove.
* gimple.h (gimple_set_in_transaction): Remove. (gimple_in_transaction): Look in BB instead. (gimple_statement_base): Remove in_transaction field. * basic-block.h (enum bb_flags): Add BB_IN_TRANSACTION. * trans-mem.c (compute_transaction_bits): Place transaction bit information into basic blocks. From-SVN: r187729
This commit is contained in:
parent
0ac65d04f4
commit
83e1a7f080
@ -1,3 +1,12 @@
|
||||
2012-05-21 Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
* gimple.h (gimple_set_in_transaction): Remove.
|
||||
(gimple_in_transaction): Look in BB instead.
|
||||
(gimple_statement_base): Remove in_transaction field.
|
||||
* basic-block.h (enum bb_flags): Add BB_IN_TRANSACTION.
|
||||
* trans-mem.c (compute_transaction_bits): Place transaction bit
|
||||
information into basic blocks.
|
||||
|
||||
2012-05-21 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* expr.c (get_def_for_expr_class): Define only if
|
||||
|
@ -263,7 +263,12 @@ enum bb_flags
|
||||
BB_MODIFIED = 1 << 12,
|
||||
|
||||
/* A general visited flag for passes to use. */
|
||||
BB_VISITED = 1 << 13
|
||||
BB_VISITED = 1 << 13,
|
||||
|
||||
/* Set on blocks that are in a transaction. This is calculated on
|
||||
demand, and is available after calling
|
||||
compute_transaction_bits(). */
|
||||
BB_IN_TRANSACTION = 1 << 14
|
||||
};
|
||||
|
||||
/* Dummy flag for convenience in the hot/cold partitioning code. */
|
||||
|
15
gcc/gimple.h
15
gcc/gimple.h
@ -179,11 +179,6 @@ struct GTY(()) gimple_statement_base {
|
||||
/* Nonzero if this statement contains volatile operands. */
|
||||
unsigned has_volatile_ops : 1;
|
||||
|
||||
/* Nonzero if this statement appears inside a transaction. This bit
|
||||
is calculated on de-mand and has relevant information only after
|
||||
it has been calculated with compute_transaction_bits. */
|
||||
unsigned in_transaction : 1;
|
||||
|
||||
/* The SUBCODE field can be used for tuple-specific flags for tuples
|
||||
that do not require subcodes. Note that SUBCODE should be at
|
||||
least as wide as tree codes, as several tuples store tree codes
|
||||
@ -1598,15 +1593,7 @@ gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
|
||||
static inline bool
|
||||
gimple_in_transaction (gimple stmt)
|
||||
{
|
||||
return stmt->gsbase.in_transaction;
|
||||
}
|
||||
|
||||
/* Set the IN_TRANSACTION flag to TRANSACTIONP. */
|
||||
|
||||
static inline void
|
||||
gimple_set_in_transaction (gimple stmt, bool transactionp)
|
||||
{
|
||||
stmt->gsbase.in_transaction = (unsigned) transactionp;
|
||||
return gimple_bb (stmt)->flags & BB_IN_TRANSACTION;
|
||||
}
|
||||
|
||||
/* Return true if statement STMT may access memory. */
|
||||
|
@ -2451,13 +2451,15 @@ compute_transaction_bits (void)
|
||||
struct tm_region *region;
|
||||
VEC (basic_block, heap) *queue;
|
||||
unsigned int i;
|
||||
gimple_stmt_iterator gsi;
|
||||
basic_block bb;
|
||||
|
||||
/* ?? Perhaps we need to abstract gate_tm_init further, because we
|
||||
certainly don't need it to calculate CDI_DOMINATOR info. */
|
||||
gate_tm_init ();
|
||||
|
||||
FOR_EACH_BB (bb)
|
||||
bb->flags &= ~BB_IN_TRANSACTION;
|
||||
|
||||
for (region = all_tm_regions; region; region = region->next)
|
||||
{
|
||||
queue = get_tm_region_blocks (region->entry_block,
|
||||
@ -2466,11 +2468,7 @@ compute_transaction_bits (void)
|
||||
NULL,
|
||||
/*stop_at_irr_p=*/true);
|
||||
for (i = 0; VEC_iterate (basic_block, queue, i, bb); ++i)
|
||||
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
|
||||
{
|
||||
gimple stmt = gsi_stmt (gsi);
|
||||
gimple_set_in_transaction (stmt, true);
|
||||
}
|
||||
bb->flags |= BB_IN_TRANSACTION;
|
||||
VEC_free (basic_block, heap, queue);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user