Commit 4cea6c02 by Eric Botcazou Committed by Eric Botcazou

tree.h: Update the table of flags used on tree nodes.

	* tree.h: Update the table of flags used on tree nodes.
	(TREE_NO_TRAMPOLINE): New accessor for static_flag.
	(SAVE_EXPR_RESOLVED_P): Use automatically-built access check.
	(FORCED_LABEL): Add access check.
	(CALL_EXPR_RETURN_SLOT_OPT): Likewise.
	(ASM_INPUT_P): Likewise.
	(ASM_VOLATILE_P): Likewise.
	(EH_FILTER_MUST_NOT_THROW): Access static_flag directly.
	(OMP_SECTION_LAST): Access private_flag directly.
	(OMP_RETURN_NOWAIT): Likewise.
	(OMP_PARALLEL_COMBINED): Likewise.
	(OMP_CLAUSE_PRIVATE_DEBUG): Access public_flag directly.
	(OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE): Likewise.
	* tree-ssa-propagate.c (STMT_IN_SSA_EDGE_WORKLIST): Access
	deprecated_flag directly.

From-SVN: r135881
parent 23ed71c6
2008-05-25 Eric Botcazou <ebotcazou@adacore.com>
* tree.h: Update the table of flags used on tree nodes.
(TREE_NO_TRAMPOLINE): New accessor for static_flag.
(SAVE_EXPR_RESOLVED_P): Use automatically-built access check.
(FORCED_LABEL): Add access check.
(CALL_EXPR_RETURN_SLOT_OPT): Likewise.
(ASM_INPUT_P): Likewise.
(ASM_VOLATILE_P): Likewise.
(EH_FILTER_MUST_NOT_THROW): Access static_flag directly.
(OMP_SECTION_LAST): Access private_flag directly.
(OMP_RETURN_NOWAIT): Likewise.
(OMP_PARALLEL_COMBINED): Likewise.
(OMP_CLAUSE_PRIVATE_DEBUG): Access public_flag directly.
(OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE): Likewise.
* tree-ssa-propagate.c (STMT_IN_SSA_EDGE_WORKLIST): Access
deprecated_flag directly.
2008-05-25 H.J. Lu <hongjiu.lu@intel.com> 2008-05-25 H.J. Lu <hongjiu.lu@intel.com>
* final.c (frame_pointer_needed): Removed. * final.c (frame_pointer_needed): Removed.
......
...@@ -117,13 +117,13 @@ ...@@ -117,13 +117,13 @@
static ssa_prop_visit_stmt_fn ssa_prop_visit_stmt; static ssa_prop_visit_stmt_fn ssa_prop_visit_stmt;
static ssa_prop_visit_phi_fn ssa_prop_visit_phi; static ssa_prop_visit_phi_fn ssa_prop_visit_phi;
/* Use the TREE_DEPRECATED bitflag to mark statements that have been /* Use the deprecated flag to mark statements that have been
added to one of the SSA edges worklists. This flag is used to added to one of the SSA edges worklists. This flag is used to
avoid visiting statements unnecessarily when draining an SSA edge avoid visiting statements unnecessarily when draining an SSA edge
worklist. If while simulating a basic block, we find a statement with worklist. If while simulating a basic block, we find a statement with
STMT_IN_SSA_EDGE_WORKLIST set, we clear it to prevent SSA edge STMT_IN_SSA_EDGE_WORKLIST set, we clear it to prevent SSA edge
processing from visiting it again. */ processing from visiting it again. */
#define STMT_IN_SSA_EDGE_WORKLIST(T) TREE_DEPRECATED (T) #define STMT_IN_SSA_EDGE_WORKLIST(T) ((T)->base.deprecated_flag)
/* A bitmap to keep track of executable blocks in the CFG. */ /* A bitmap to keep track of executable blocks in the CFG. */
static sbitmap executable_blocks; static sbitmap executable_blocks;
......
...@@ -423,83 +423,114 @@ struct gimple_stmt GTY(()) ...@@ -423,83 +423,114 @@ struct gimple_stmt GTY(())
}; };
/* The following table lists the uses of each of the above flags and /* The following table lists the uses of each of the above flags and
for which types of nodes they are defined. Note that expressions for which types of nodes they are defined.
include decls.
addressable_flag: addressable_flag:
TREE_ADDRESSABLE in TREE_ADDRESSABLE in
VAR_DECL, FUNCTION_DECL, FIELD_DECL, CONSTRUCTOR, LABEL_DECL, VAR_DECL, FUNCTION_DECL, FIELD_DECL, LABEL_DECL
..._TYPE, IDENTIFIER_NODE. all types
In a STMT_EXPR, it means we want the result of the enclosed CONSTRUCTOR, IDENTIFIER_NODE
expression. STMT_EXPR, it means we want the result of the enclosed expression
CALL_EXPR_TAILCALL in CALL_EXPR
CASE_LOW_SEEN in CASE_LABEL_EXPR CALL_EXPR_TAILCALL in
RETURN_EXPR_OUTCOME in RETURN_EXPR CALL_EXPR
CASE_LOW_SEEN in
CASE_LABEL_EXPR
static_flag: static_flag:
TREE_STATIC in TREE_STATIC in
VAR_DECL, FUNCTION_DECL, CONSTRUCTOR, ADDR_EXPR VAR_DECL, FUNCTION_DECL
CONSTRUCTOR
TREE_NO_TRAMPOLINE in
ADDR_EXPR
BINFO_VIRTUAL_P in BINFO_VIRTUAL_P in
TREE_BINFO TREE_BINFO
TREE_SYMBOL_REFERENCED in TREE_SYMBOL_REFERENCED in
IDENTIFIER_NODE IDENTIFIER_NODE
CLEANUP_EH_ONLY in CLEANUP_EH_ONLY in
TARGET_EXPR, WITH_CLEANUP_EXPR TARGET_EXPR, WITH_CLEANUP_EXPR
TRY_CATCH_IS_CLEANUP in TRY_CATCH_IS_CLEANUP in
TRY_CATCH_EXPR TRY_CATCH_EXPR
ASM_INPUT_P in ASM_INPUT_P in
ASM_EXPR ASM_EXPR
EH_FILTER_MUST_NOT_THROW in EH_FILTER_EXPR
EH_FILTER_MUST_NOT_THROW in
EH_FILTER_EXPR
TYPE_REF_CAN_ALIAS_ALL in TYPE_REF_CAN_ALIAS_ALL in
POINTER_TYPE, REFERENCE_TYPE POINTER_TYPE, REFERENCE_TYPE
MOVE_NONTEMPORAL in MOVE_NONTEMPORAL in
GIMPLE_MODIFY_STMT GIMPLE_MODIFY_STMT
CASE_HIGH_SEEN in CASE_HIGH_SEEN in
CASE_LABEL_EXPR CASE_LABEL_EXPR
CALL_CANNOT_INLINE_P in CALL_CANNOT_INLINE_P in
CALL_EXPR CALL_EXPR
public_flag: public_flag:
TREE_OVERFLOW in TREE_OVERFLOW in
INTEGER_CST, REAL_CST, COMPLEX_CST, VECTOR_CST INTEGER_CST, REAL_CST, COMPLEX_CST, VECTOR_CST
TREE_PUBLIC in TREE_PUBLIC in
VAR_DECL or FUNCTION_DECL or IDENTIFIER_NODE VAR_DECL, FUNCTION_DECL
IDENTIFIER_NODE
ASM_VOLATILE_P in ASM_VOLATILE_P in
ASM_EXPR ASM_EXPR
CALL_EXPR_VA_ARG_PACK in CALL_EXPR_VA_ARG_PACK in
CALL_EXPR CALL_EXPR
TYPE_CACHED_VALUES_P in TYPE_CACHED_VALUES_P in
..._TYPE all types
SAVE_EXPR_RESOLVED_P in SAVE_EXPR_RESOLVED_P in
SAVE_EXPR SAVE_EXPR
OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE in OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE in
OMP_CLAUSE_LASTPRIVATE OMP_CLAUSE_LASTPRIVATE
OMP_CLAUSE_PRIVATE_DEBUG in OMP_CLAUSE_PRIVATE_DEBUG in
OMP_CLAUSE_PRIVATE OMP_CLAUSE_PRIVATE
private_flag: private_flag:
TREE_PRIVATE in TREE_PRIVATE in
..._DECL all decls
CALL_EXPR_RETURN_SLOT_OPT in CALL_EXPR_RETURN_SLOT_OPT in
CALL_EXPR CALL_EXPR
DECL_BY_REFERENCE in DECL_BY_REFERENCE in
PARM_DECL, RESULT_DECL PARM_DECL, RESULT_DECL
OMP_RETURN_NOWAIT in OMP_RETURN_NOWAIT in
OMP_RETURN OMP_RETURN
OMP_SECTION_LAST in OMP_SECTION_LAST in
OMP_SECTION OMP_SECTION
OMP_PARALLEL_COMBINED in OMP_PARALLEL_COMBINED in
OMP_PARALLEL OMP_PARALLEL
protected_flag: protected_flag:
TREE_PROTECTED in TREE_PROTECTED in
BLOCK BLOCK
..._DECL all decls
CALL_FROM_THUNK_P in CALL_FROM_THUNK_P in
CALL_EXPR CALL_EXPR
...@@ -507,75 +538,95 @@ struct gimple_stmt GTY(()) ...@@ -507,75 +538,95 @@ struct gimple_stmt GTY(())
TREE_SIDE_EFFECTS in TREE_SIDE_EFFECTS in
all expressions all expressions
all decls all decls
all constants all constants
FORCED_LABEL in FORCED_LABEL in
LABEL_DECL LABEL_DECL
volatile_flag: volatile_flag:
TREE_THIS_VOLATILE in TREE_THIS_VOLATILE in
all expressions all expressions
all decls
TYPE_VOLATILE in TYPE_VOLATILE in
..._TYPE all types
readonly_flag: readonly_flag:
TREE_READONLY in TREE_READONLY in
all expressions all expressions
all decls
TYPE_READONLY in TYPE_READONLY in
..._TYPE all types
constant_flag: constant_flag:
TREE_CONSTANT in TREE_CONSTANT in
all expressions all expressions
all decls all decls
all constants all constants
TYPE_SIZES_GIMPLIFIED
..._TYPE TYPE_SIZES_GIMPLIFIED in
all types
unsigned_flag: unsigned_flag:
TYPE_UNSIGNED in TYPE_UNSIGNED in
all types all types
DECL_UNSIGNED in DECL_UNSIGNED in
all decls all decls
REGISTER_DEFS_IN_THIS_STMT in
all expressions (tree-into-ssa.c)
asm_written_flag: asm_written_flag:
TREE_ASM_WRITTEN in TREE_ASM_WRITTEN in
VAR_DECL, FUNCTION_DECL, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE VAR_DECL, FUNCTION_DECL
BLOCK, SSA_NAME, STRING_CST RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
BLOCK, SSA_NAME, STRING_CST
NECESSARY in
all expressions (tree-ssa-dce.c, tree-ssa-pre.c)
used_flag: used_flag:
TREE_USED in TREE_USED in
expressions, IDENTIFIER_NODE all expressions
all decls
IDENTIFIER_NODE
nothrow_flag: nothrow_flag:
TREE_NOTHROW in TREE_NOTHROW in
CALL_EXPR, FUNCTION_DECL CALL_EXPR
FUNCTION_DECL
TYPE_ALIGN_OK in TYPE_ALIGN_OK in
..._TYPE all types
TREE_THIS_NOTRAP in TREE_THIS_NOTRAP in
(ALIGN/MISALIGNED_)INDIRECT_REF, ARRAY_REF, ARRAY_RANGE_REF (ALIGN/MISALIGNED_)INDIRECT_REF, ARRAY_REF, ARRAY_RANGE_REF
deprecated_flag: deprecated_flag:
TREE_DEPRECATED in TREE_DEPRECATED in
..._DECL all decls
IDENTIFIER_TRANSPARENT_ALIAS in
IDENTIFIER_NODE
IDENTIFIER_TRANSPARENT_ALIAS in STMT_IN_SSA_EDGE_WORKLIST in
IDENTIFIER_NODE all expressions (tree-ssa-propagate.c)
visited: visited:
Used in tree traversals to mark visited nodes. TREE_VISITED in
all trees (used liberally by many passes)
saturating_flag: saturating_flag:
...@@ -585,8 +636,15 @@ struct gimple_stmt GTY(()) ...@@ -585,8 +636,15 @@ struct gimple_stmt GTY(())
nowarning_flag: nowarning_flag:
TREE_NO_WARNING in TREE_NO_WARNING in
... any expr or decl node all expressions
all decls
default_def_flag:
SSA_NAME_IS_DEFAULT_DEF in
SSA_NAME
*/ */
#undef DEFTREESTRUCT #undef DEFTREESTRUCT
#define DEFTREESTRUCT(ENUM, NAME) ENUM, #define DEFTREESTRUCT(ENUM, NAME) ENUM,
enum tree_node_structure_enum { enum tree_node_structure_enum {
...@@ -1169,12 +1227,12 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, ...@@ -1169,12 +1227,12 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
/* In a VAR_DECL, nonzero means allocate static storage. /* In a VAR_DECL, nonzero means allocate static storage.
In a FUNCTION_DECL, nonzero if function has been defined. In a FUNCTION_DECL, nonzero if function has been defined.
In a CONSTRUCTOR, nonzero means allocate static storage. In a CONSTRUCTOR, nonzero means allocate static storage. */
??? This is also used in lots of other nodes in unclear ways which
should be cleaned up some day. */
#define TREE_STATIC(NODE) ((NODE)->base.static_flag) #define TREE_STATIC(NODE) ((NODE)->base.static_flag)
/* In an ADDR_EXPR, nonzero means do not use a trampoline. */
#define TREE_NO_TRAMPOLINE(NODE) (ADDR_EXPR_CHECK (NODE)->base.static_flag)
/* In a TARGET_EXPR or WITH_CLEANUP_EXPR, means that the pertinent cleanup /* In a TARGET_EXPR or WITH_CLEANUP_EXPR, means that the pertinent cleanup
should only be executed if an exception is thrown, not on normal exit should only be executed if an exception is thrown, not on normal exit
of its scope. */ of its scope. */
...@@ -1241,7 +1299,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, ...@@ -1241,7 +1299,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
/* In a SAVE_EXPR, indicates that the original expression has already /* In a SAVE_EXPR, indicates that the original expression has already
been substituted with a VAR_DECL that contains the value. */ been substituted with a VAR_DECL that contains the value. */
#define SAVE_EXPR_RESOLVED_P(NODE) \ #define SAVE_EXPR_RESOLVED_P(NODE) \
(TREE_CHECK (NODE, SAVE_EXPR)->base.public_flag) (SAVE_EXPR_CHECK (NODE)->base.public_flag)
/* Set on a CALL_EXPR if this stdarg call should be passed the argument /* Set on a CALL_EXPR if this stdarg call should be passed the argument
pack. */ pack. */
...@@ -1259,7 +1317,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, ...@@ -1259,7 +1317,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
/* In a LABEL_DECL, nonzero means this label had its address taken /* In a LABEL_DECL, nonzero means this label had its address taken
and therefore can never be deleted and is a jump target for and therefore can never be deleted and is a jump target for
computed gotos. */ computed gotos. */
#define FORCED_LABEL(NODE) ((NODE)->base.side_effects_flag) #define FORCED_LABEL(NODE) (LABEL_DECL_CHECK (NODE)->base.side_effects_flag)
/* Nonzero means this expression is volatile in the C sense: /* Nonzero means this expression is volatile in the C sense:
its address should be of type `volatile WHATEVER *'. its address should be of type `volatile WHATEVER *'.
...@@ -1333,17 +1391,16 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, ...@@ -1333,17 +1391,16 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
/* In a CALL_EXPR, means that it's safe to use the target of the call /* In a CALL_EXPR, means that it's safe to use the target of the call
expansion as the return slot for a call that returns in memory. */ expansion as the return slot for a call that returns in memory. */
#define CALL_EXPR_RETURN_SLOT_OPT(NODE) ((NODE)->base.private_flag) #define CALL_EXPR_RETURN_SLOT_OPT(NODE) \
(CALL_EXPR_CHECK (NODE)->base.private_flag)
/* In a RESULT_DECL or PARM_DECL, means that it is passed by invisible /* In a RESULT_DECL or PARM_DECL, means that it is passed by invisible
reference (and the TREE_TYPE is a pointer to the true type). */ reference (and the TREE_TYPE is a pointer to the true type). */
#define DECL_BY_REFERENCE(NODE) \ #define DECL_BY_REFERENCE(NODE) (DECL_COMMON_CHECK (NODE)->base.private_flag)
(DECL_COMMON_CHECK (NODE)->base.private_flag)
/* In a CALL_EXPR, means that the call is the jump from a thunk to the /* In a CALL_EXPR, means that the call is the jump from a thunk to the
thunked-to function. */ thunked-to function. */
#define CALL_FROM_THUNK_P(NODE) \ #define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag)
(CALL_EXPR_CHECK (NODE)->base.protected_flag)
/* In a type, nonzero means that all objects of the type are guaranteed by the /* In a type, nonzero means that all objects of the type are guaranteed by the
language or front-end to be properly aligned, so we can indicate that a MEM language or front-end to be properly aligned, so we can indicate that a MEM
...@@ -1664,8 +1721,8 @@ struct tree_constructor GTY(()) ...@@ -1664,8 +1721,8 @@ struct tree_constructor GTY(())
#define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 3) #define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 3)
/* Nonzero if we want to create an ASM_INPUT instead of an /* Nonzero if we want to create an ASM_INPUT instead of an
ASM_OPERAND with no operands. */ ASM_OPERAND with no operands. */
#define ASM_INPUT_P(NODE) (TREE_STATIC (NODE)) #define ASM_INPUT_P(NODE) (ASM_EXPR_CHECK (NODE)->base.static_flag)
#define ASM_VOLATILE_P(NODE) (TREE_PUBLIC (NODE)) #define ASM_VOLATILE_P(NODE) (ASM_EXPR_CHECK (NODE)->base.public_flag)
/* COND_EXPR accessors. */ /* COND_EXPR accessors. */
#define COND_EXPR_COND(NODE) (TREE_OPERAND (COND_EXPR_CHECK (NODE), 0)) #define COND_EXPR_COND(NODE) (TREE_OPERAND (COND_EXPR_CHECK (NODE), 0))
...@@ -1692,7 +1749,8 @@ struct tree_constructor GTY(()) ...@@ -1692,7 +1749,8 @@ struct tree_constructor GTY(())
/* EH_FILTER_EXPR accessors. */ /* EH_FILTER_EXPR accessors. */
#define EH_FILTER_TYPES(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 0) #define EH_FILTER_TYPES(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 0)
#define EH_FILTER_FAILURE(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1) #define EH_FILTER_FAILURE(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1)
#define EH_FILTER_MUST_NOT_THROW(NODE) TREE_STATIC (EH_FILTER_EXPR_CHECK (NODE)) #define EH_FILTER_MUST_NOT_THROW(NODE) \
(EH_FILTER_EXPR_CHECK (NODE)->base.static_flag)
/* CHANGE_DYNAMIC_TYPE_EXPR accessors. */ /* CHANGE_DYNAMIC_TYPE_EXPR accessors. */
#define CHANGE_DYNAMIC_TYPE_NEW_TYPE(NODE) \ #define CHANGE_DYNAMIC_TYPE_NEW_TYPE(NODE) \
...@@ -1770,30 +1828,30 @@ struct tree_constructor GTY(()) ...@@ -1770,30 +1828,30 @@ struct tree_constructor GTY(())
/* True on an OMP_SECTION statement that was the last lexical member. /* True on an OMP_SECTION statement that was the last lexical member.
This status is meaningful in the implementation of lastprivate. */ This status is meaningful in the implementation of lastprivate. */
#define OMP_SECTION_LAST(NODE) \ #define OMP_SECTION_LAST(NODE) \
TREE_PRIVATE (OMP_SECTION_CHECK (NODE)) (OMP_SECTION_CHECK (NODE)->base.private_flag)
/* True on an OMP_RETURN statement if the return does not require a /* True on an OMP_RETURN statement if the return does not require a
thread synchronization via some sort of barrier. The exact barrier thread synchronization via some sort of barrier. The exact barrier
that would otherwise be emitted is dependent on the OMP statement that would otherwise be emitted is dependent on the OMP statement
with which this return is associated. */ with which this return is associated. */
#define OMP_RETURN_NOWAIT(NODE) \ #define OMP_RETURN_NOWAIT(NODE) \
TREE_PRIVATE (OMP_RETURN_CHECK (NODE)) (OMP_RETURN_CHECK (NODE)->base.private_flag)
/* True on an OMP_PARALLEL statement if it represents an explicit /* True on an OMP_PARALLEL statement if it represents an explicit
combined parallel work-sharing constructs. */ combined parallel work-sharing constructs. */
#define OMP_PARALLEL_COMBINED(NODE) \ #define OMP_PARALLEL_COMBINED(NODE) \
TREE_PRIVATE (OMP_PARALLEL_CHECK (NODE)) (OMP_PARALLEL_CHECK (NODE)->base.private_flag)
/* True on a PRIVATE clause if its decl is kept around for debugging /* True on a PRIVATE clause if its decl is kept around for debugging
information only and its DECL_VALUE_EXPR is supposed to point information only and its DECL_VALUE_EXPR is supposed to point
to what it has been remapped to. */ to what it has been remapped to. */
#define OMP_CLAUSE_PRIVATE_DEBUG(NODE) \ #define OMP_CLAUSE_PRIVATE_DEBUG(NODE) \
TREE_PUBLIC (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_PRIVATE)) (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_PRIVATE)->base.public_flag)
/* True on a LASTPRIVATE clause if a FIRSTPRIVATE clause for the same /* True on a LASTPRIVATE clause if a FIRSTPRIVATE clause for the same
decl is present in the chain. */ decl is present in the chain. */
#define OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE(NODE) \ #define OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE(NODE) \
TREE_PUBLIC (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_LASTPRIVATE)) (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_LASTPRIVATE)->base.public_flag)
#define OMP_CLAUSE_IF_EXPR(NODE) \ #define OMP_CLAUSE_IF_EXPR(NODE) \
OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_IF), 0) OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_IF), 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment