aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index b2b345e..92edd18 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -305,8 +305,10 @@ struct GTY(()) gimple_statement_base {
/* Nonzero if this statement contains volatile operands. */
unsigned has_volatile_ops : 1;
- /* Padding to get subcode to 16 bit alignment. */
- unsigned pad : 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
@@ -1120,6 +1122,7 @@ extern tree omp_reduction_init (tree, tree);
/* In trans-mem.c. */
extern void diagnose_tm_safe_errors (tree);
+extern void compute_transaction_bits (void);
/* In tree-nested.c. */
extern void lower_nested_functions (tree);
@@ -1584,6 +1587,21 @@ gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
}
+/* Return true if STMT is in a transaction. */
+
+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 true if statement STMT may access memory. */