diff options
author | Richard Guenther <rguenther@suse.de> | 2007-11-09 12:47:22 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-11-09 12:47:22 +0000 |
commit | 91a17a346ef6b2f901a3fe4077228d918a98a8b5 (patch) | |
tree | 60e612eb97df78babf1d3f9bbad35916c5e01f68 /gcc | |
parent | 6aaa40131a37f28ffc3f1788b66293248b4abb5c (diff) | |
download | gcc-91a17a346ef6b2f901a3fe4077228d918a98a8b5.zip gcc-91a17a346ef6b2f901a3fe4077228d918a98a8b5.tar.gz gcc-91a17a346ef6b2f901a3fe4077228d918a98a8b5.tar.bz2 |
tree-flow.h (struct ptr_info_def): Make escape_mask a ENUM_BITFIELD.
2007-11-09 Richard Guenther <rguenther@suse.de>
* tree-flow.h (struct ptr_info_def): Make escape_mask a
ENUM_BITFIELD.
(struct ptr_info_def): Likewise.
(enum escape_type): Also use bit zero.
From-SVN: r130041
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-flow.h | 54 |
2 files changed, 34 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce33a5b..6dc7fed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2007-11-09 Richard Guenther <rguenther@suse.de> + * tree-flow.h (struct ptr_info_def): Make escape_mask a + ENUM_BITFIELD. + (struct ptr_info_def): Likewise. + (enum escape_type): Also use bit zero. + +2007-11-09 Richard Guenther <rguenther@suse.de> + PR tree-optimization/33604 * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Disregard changes in CV qualifiers of pointed to types for diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 1b63e95..02e9543 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -40,6 +40,25 @@ typedef struct basic_block_def *basic_block; #endif struct static_var_ann_d; +/* The reasons a variable may escape a function. */ +enum escape_type +{ + NO_ESCAPE = 0, /* Doesn't escape. */ + ESCAPE_STORED_IN_GLOBAL = 1 << 0, + ESCAPE_TO_ASM = 1 << 1, /* Passed by address to an assembly + statement. */ + ESCAPE_TO_CALL = 1 << 2, /* Escapes to a function call. */ + ESCAPE_BAD_CAST = 1 << 3, /* Cast from pointer to integer */ + ESCAPE_TO_RETURN = 1 << 4, /* Returned from function. */ + ESCAPE_TO_PURE_CONST = 1 << 5, /* Escapes to a pure or constant + function call. */ + ESCAPE_IS_GLOBAL = 1 << 6, /* Is a global variable. */ + ESCAPE_IS_PARM = 1 << 7, /* Is an incoming function argument. */ + ESCAPE_UNKNOWN = 1 << 8 /* We believe it escapes for + some reason not enumerated + above. */ +}; + /* Memory reference statistics for individual memory symbols, collected during alias analysis. */ struct mem_sym_stats_d GTY(()) @@ -228,6 +247,9 @@ struct ptr_info_def GTY(()) /* Nonzero if this pointer points to NULL. */ unsigned int pt_null : 1; + /* Mask of reasons this pointer's value escapes the function */ + ENUM_BITFIELD (escape_type) escape_mask : 9; + /* Set of variables that this pointer may point to. */ bitmap pt_vars; @@ -236,9 +258,6 @@ struct ptr_info_def GTY(()) pointer will be represented by this memory tag, instead of the type tag computed by TBAA. */ tree name_mem_tag; - - /* Mask of reasons this pointer's value escapes the function */ - unsigned int escape_mask; }; @@ -343,13 +362,17 @@ struct var_ann_d GTY(()) unsigned is_heapvar : 1; /* True if the variable is call clobbered. */ - unsigned int call_clobbered : 1; + unsigned call_clobbered : 1; /* This field describes several "no alias" attributes that some symbols are known to have. See the enum's definition for more information on each attribute. */ ENUM_BITFIELD (noalias_state) noalias_state : 2; + /* Mask of values saying the reasons why this variable has escaped + the function. */ + ENUM_BITFIELD (escape_type) escape_mask : 9; + /* Memory partition tag assigned to this symbol. */ tree mpt; @@ -376,10 +399,6 @@ struct var_ann_d GTY(()) /* If this variable is a structure, this fields holds an array of symbols representing each of the fields of the structure. */ VEC(tree,gc) *subvars; - - /* Mask of values saying the reasons why this variable has escaped - the function. */ - unsigned int escape_mask; }; /* Container for variable annotation used by hashtable for annotations for @@ -1033,25 +1052,6 @@ enum move_pos extern enum move_pos movement_possibility (tree); char *get_lsm_tmp_name (tree, unsigned); -/* The reasons a variable may escape a function. */ -enum escape_type -{ - NO_ESCAPE = 0, /* Doesn't escape. */ - ESCAPE_STORED_IN_GLOBAL = 1 << 1, - ESCAPE_TO_ASM = 1 << 2, /* Passed by address to an assembly - statement. */ - ESCAPE_TO_CALL = 1 << 3, /* Escapes to a function call. */ - ESCAPE_BAD_CAST = 1 << 4, /* Cast from pointer to integer */ - ESCAPE_TO_RETURN = 1 << 5, /* Returned from function. */ - ESCAPE_TO_PURE_CONST = 1 << 6, /* Escapes to a pure or constant - function call. */ - ESCAPE_IS_GLOBAL = 1 << 7, /* Is a global variable. */ - ESCAPE_IS_PARM = 1 << 8, /* Is an incoming function argument. */ - ESCAPE_UNKNOWN = 1 << 9 /* We believe it escapes for - some reason not enumerated - above. */ -}; - /* In tree-flow-inline.h */ static inline bool is_call_clobbered (const_tree); static inline void mark_call_clobbered (tree, unsigned int); |