diff options
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/tree-flow-inline.h | 6 | ||||
-rw-r--r-- | gcc/tree-flow.h | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-alias.c | 6 | ||||
-rw-r--r-- | gcc/tree-ssa.c | 14 | ||||
-rw-r--r-- | gcc/tree.h | 7 |
6 files changed, 26 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 93be53d2592..83440dd795b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2006-12-30 Jan Hubicka <jh@suse.cz> + * tree.h (DECL_CALL_CLOBBERED): Remove. + (tree_decl_common): Remove call_clobbered flag. + * tree-flow.h (struct var_ann_d): Add call_clobbered flag. + * tree-ssa-alias.c (mark_non_addressable, reset_cc_flags): Update. + * tree-flow-inline.h (is_call_clobbered, mark_call_clobbered, + clear_call_clobbered): Update. + * tree-ssa.c (verify_call_clobbering): Update. + +2006-12-30 Jan Hubicka <jh@suse.cz> + * tree-ssa-alias.c (create_structure_vars): When in SSA, update operand caches. * tree-ssa-operands.c (build_ssa_operands): Recompute addresses_taken diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 0695c656293..a2d3e62d371 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -919,7 +919,7 @@ static inline bool is_call_clobbered (tree var) { if (!MTAG_P (var)) - return DECL_CALL_CLOBBERED (var); + return var_ann (var)->call_clobbered; else return bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var)); } @@ -930,7 +930,7 @@ mark_call_clobbered (tree var, unsigned int escape_type) { var_ann (var)->escape_mask |= escape_type; if (!MTAG_P (var)) - DECL_CALL_CLOBBERED (var) = true; + var_ann (var)->call_clobbered = true; bitmap_set_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var)); } @@ -943,7 +943,7 @@ clear_call_clobbered (tree var) if (MTAG_P (var) && TREE_CODE (var) != STRUCT_FIELD_TAG) MTAG_GLOBAL (var) = 0; if (!MTAG_P (var)) - DECL_CALL_CLOBBERED (var) = false; + var_ann (var)->call_clobbered = false; bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var)); } diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 08e65c7469c..82dae23110d 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -251,6 +251,9 @@ struct var_ann_d GTY(()) /* True for HEAP and PARM_NOALIAS artificial variables. */ unsigned is_heapvar : 1; + /* True if the variable is call clobbered. */ + unsigned int call_clobbered : 1; + /* Memory partition tag assigned to this symbol. */ tree mpt; diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 2ef529707cd..7aff7ee854d 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -126,7 +126,7 @@ mark_non_addressable (tree var) mpt = memory_partition (var); if (!MTAG_P (var)) - DECL_CALL_CLOBBERED (var) = false; + var_ann (var)->call_clobbered = false; bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var)); TREE_ADDRESSABLE (var) = 0; @@ -3266,7 +3266,7 @@ struct tree_opt_pass pass_create_structure_vars = 0 /* letter */ }; -/* Reset the DECL_CALL_CLOBBERED flags on our referenced vars. In +/* Reset the call_clobbered flags on our referenced vars. In theory, this only needs to be done for globals. */ static unsigned int @@ -3276,7 +3276,7 @@ reset_cc_flags (void) referenced_var_iterator rvi; FOR_EACH_REFERENCED_VAR (var, rvi) - DECL_CALL_CLOBBERED (var) = false; + var_ann (var)->call_clobbered = false; return 0; } diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 6ca8f031ac9..644a7976402 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -508,11 +508,11 @@ verify_call_clobbering (void) tree var; referenced_var_iterator rvi; - /* At all times, the result of the DECL_CALL_CLOBBERED flag should + /* At all times, the result of the call_clobbered flag should match the result of the call_clobbered_vars bitmap. Verify both that everything in call_clobbered_vars is marked - DECL_CALL_CLOBBERED, and that everything marked - DECL_CALL_CLOBBERED is in call_clobbered_vars. */ + call_clobbered, and that everything marked + call_clobbered is in call_clobbered_vars. */ EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi) { var = referenced_var (i); @@ -520,10 +520,10 @@ verify_call_clobbering (void) if (memory_partition (var)) var = memory_partition (var); - if (!MTAG_P (var) && !DECL_CALL_CLOBBERED (var)) + if (!MTAG_P (var) && !var_ann (var)->call_clobbered) { error ("variable in call_clobbered_vars but not marked " - "DECL_CALL_CLOBBERED"); + "call_clobbered"); debug_variable (var); goto err; } @@ -538,10 +538,10 @@ verify_call_clobbering (void) var = memory_partition (var); if (!MTAG_P (var) - && DECL_CALL_CLOBBERED (var) + && var_ann (var)->call_clobbered && !bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var))) { - error ("variable marked DECL_CALL_CLOBBERED but not in " + error ("variable marked call_clobbered but not in " "call_clobbered_vars bitmap."); debug_variable (var); goto err; diff --git a/gcc/tree.h b/gcc/tree.h index b7ec8035b3c..0c9e02e91f5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2607,12 +2607,6 @@ struct tree_memory_partition_tag GTY(()) #define DECL_GIMPLE_REG_P(DECL) \ DECL_COMMON_CHECK (DECL)->decl_common.gimple_reg_flag -/* This is true if DECL is call clobbered in the current function. - The result of this flag should always be the same as - bitmap_bit_p (call_clobbered_vars, DECL_UID (decl)). */ -#define DECL_CALL_CLOBBERED(DECL) \ - DECL_COMMON_CHECK (DECL)->decl_common.call_clobbered_flag - struct tree_decl_common GTY(()) { struct tree_decl_minimal common; @@ -2653,7 +2647,6 @@ struct tree_decl_common GTY(()) /* Logically, these two would go in a theoretical base shared by var and parm decl. */ unsigned gimple_reg_flag : 1; - unsigned call_clobbered_flag : 1; union tree_decl_u1 { /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is |