/* 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
bool (*)(gimple, tree, void *),
bool (*)(gimple, tree, void *));
extern bool gimple_ior_addresses_taken (bitmap, gimple);
+extern bool gimple_call_builtin_class_p (gimple, enum built_in_class);
extern bool gimple_call_builtin_p (gimple, enum built_in_function);
extern bool gimple_asm_clobbers_memory_p (const_gimple);
bool in_cleanup_point_expr;
};
+/* Return true if gimplify_one_sizepos doesn't need to gimplify
+ expr (when in TYPE_SIZE{,_UNIT} and similar type/decl size/bitsize
+ fields). */
+static inline bool
+is_gimple_sizepos (tree expr)
+{
+ /* gimplify_one_sizepos doesn't need to do anything if the value isn't there,
+ is constant, or contains A PLACEHOLDER_EXPR. We also don't want to do
+ anything if it's already a VAR_DECL. If it's a VAR_DECL from another
+ function, the gimplifier will want to replace it with a new variable,
+ but that will cause problems if this type is from outside the function.
+ It's OK to have that here. */
+ return (expr == NULL_TREE
+ || TREE_CONSTANT (expr)
+ || TREE_CODE (expr) == VAR_DECL
+ || CONTAINS_PLACEHOLDER_P (expr));
+}
+
extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
bool (*) (tree), fallback_t);
extern void gimplify_type_sizes (tree, gimple_seq *);
stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
}
-/* Return true if STMT is in a transaction. */
+/* Return true if BB is in a transaction. */
static inline bool
-gimple_in_transaction (gimple stmt)
+block_in_transaction (basic_block bb)
{
- return stmt->gsbase.in_transaction;
+ return flag_tm && bb->flags & BB_IN_TRANSACTION;
}
-/* Set the IN_TRANSACTION flag to TRANSACTIONP. */
+/* Return true if STMT is in a transaction. */
-static inline void
-gimple_set_in_transaction (gimple stmt, bool transactionp)
+static inline bool
+gimple_in_transaction (gimple stmt)
{
- stmt->gsbase.in_transaction = (unsigned) transactionp;
+ return block_in_transaction (gimple_bb (stmt));
}
/* Return true if statement STMT may access memory. */