aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2012-05-21 18:02:17 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2012-05-21 18:02:17 +0000
commit83e1a7f080f91f7cc1bb7916cd15779f685c7697 (patch)
tree7d77d20baeae4084708dde20bb2b440ed8aa0bf1 /gcc
parent0ac65d04f460ef0d2275d680d251f22a77216a5b (diff)
downloadgcc-83e1a7f080f91f7cc1bb7916cd15779f685c7697.zip
gcc-83e1a7f080f91f7cc1bb7916cd15779f685c7697.tar.gz
gcc-83e1a7f080f91f7cc1bb7916cd15779f685c7697.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/basic-block.h7
-rw-r--r--gcc/gimple.h15
-rw-r--r--gcc/trans-mem.c10
4 files changed, 20 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e2f8892..251d5ef 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index f0eeba7..3aa3a78 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -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. */
diff --git a/gcc/gimple.h b/gcc/gimple.h
index aefccaa..5236192 100644
--- a/gcc/gimple.h
+++ b/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. */
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 51dd7fe..8887b9a 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -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);
}