Commit b730fa61 by Jan Hubicka Committed by Jan Hubicka

tree.h (DECL_CALL_CLOBBERED): Remove.

	* 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.

From-SVN: r120285
parent d586d6d1
2006-12-30 Jan Hubicka <jh@suse.cz> 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 * tree-ssa-alias.c (create_structure_vars): When in SSA, update operand
caches. caches.
* tree-ssa-operands.c (build_ssa_operands): Recompute addresses_taken * tree-ssa-operands.c (build_ssa_operands): Recompute addresses_taken
......
...@@ -919,7 +919,7 @@ static inline bool ...@@ -919,7 +919,7 @@ static inline bool
is_call_clobbered (tree var) is_call_clobbered (tree var)
{ {
if (!MTAG_P (var)) if (!MTAG_P (var))
return DECL_CALL_CLOBBERED (var); return var_ann (var)->call_clobbered;
else else
return bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var)); 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) ...@@ -930,7 +930,7 @@ mark_call_clobbered (tree var, unsigned int escape_type)
{ {
var_ann (var)->escape_mask |= escape_type; var_ann (var)->escape_mask |= escape_type;
if (!MTAG_P (var)) 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)); bitmap_set_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
} }
...@@ -943,7 +943,7 @@ clear_call_clobbered (tree var) ...@@ -943,7 +943,7 @@ clear_call_clobbered (tree var)
if (MTAG_P (var) && TREE_CODE (var) != STRUCT_FIELD_TAG) if (MTAG_P (var) && TREE_CODE (var) != STRUCT_FIELD_TAG)
MTAG_GLOBAL (var) = 0; MTAG_GLOBAL (var) = 0;
if (!MTAG_P (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)); bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
} }
......
...@@ -251,6 +251,9 @@ struct var_ann_d GTY(()) ...@@ -251,6 +251,9 @@ struct var_ann_d GTY(())
/* True for HEAP and PARM_NOALIAS artificial variables. */ /* True for HEAP and PARM_NOALIAS artificial variables. */
unsigned is_heapvar : 1; unsigned is_heapvar : 1;
/* True if the variable is call clobbered. */
unsigned int call_clobbered : 1;
/* Memory partition tag assigned to this symbol. */ /* Memory partition tag assigned to this symbol. */
tree mpt; tree mpt;
......
...@@ -126,7 +126,7 @@ mark_non_addressable (tree var) ...@@ -126,7 +126,7 @@ mark_non_addressable (tree var)
mpt = memory_partition (var); mpt = memory_partition (var);
if (!MTAG_P (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)); bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
TREE_ADDRESSABLE (var) = 0; TREE_ADDRESSABLE (var) = 0;
...@@ -3266,7 +3266,7 @@ struct tree_opt_pass pass_create_structure_vars = ...@@ -3266,7 +3266,7 @@ struct tree_opt_pass pass_create_structure_vars =
0 /* letter */ 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. */ theory, this only needs to be done for globals. */
static unsigned int static unsigned int
...@@ -3276,7 +3276,7 @@ reset_cc_flags (void) ...@@ -3276,7 +3276,7 @@ reset_cc_flags (void)
referenced_var_iterator rvi; referenced_var_iterator rvi;
FOR_EACH_REFERENCED_VAR (var, rvi) FOR_EACH_REFERENCED_VAR (var, rvi)
DECL_CALL_CLOBBERED (var) = false; var_ann (var)->call_clobbered = false;
return 0; return 0;
} }
......
...@@ -508,11 +508,11 @@ verify_call_clobbering (void) ...@@ -508,11 +508,11 @@ verify_call_clobbering (void)
tree var; tree var;
referenced_var_iterator rvi; 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 match the result of the call_clobbered_vars bitmap. Verify both
that everything in call_clobbered_vars is marked that everything in call_clobbered_vars is marked
DECL_CALL_CLOBBERED, and that everything marked call_clobbered, and that everything marked
DECL_CALL_CLOBBERED is in call_clobbered_vars. */ call_clobbered is in call_clobbered_vars. */
EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi) EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi)
{ {
var = referenced_var (i); var = referenced_var (i);
...@@ -520,10 +520,10 @@ verify_call_clobbering (void) ...@@ -520,10 +520,10 @@ verify_call_clobbering (void)
if (memory_partition (var)) if (memory_partition (var))
var = 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 " error ("variable in call_clobbered_vars but not marked "
"DECL_CALL_CLOBBERED"); "call_clobbered");
debug_variable (var); debug_variable (var);
goto err; goto err;
} }
...@@ -538,10 +538,10 @@ verify_call_clobbering (void) ...@@ -538,10 +538,10 @@ verify_call_clobbering (void)
var = memory_partition (var); var = memory_partition (var);
if (!MTAG_P (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))) && !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."); "call_clobbered_vars bitmap.");
debug_variable (var); debug_variable (var);
goto err; goto err;
......
...@@ -2607,12 +2607,6 @@ struct tree_memory_partition_tag GTY(()) ...@@ -2607,12 +2607,6 @@ struct tree_memory_partition_tag GTY(())
#define DECL_GIMPLE_REG_P(DECL) \ #define DECL_GIMPLE_REG_P(DECL) \
DECL_COMMON_CHECK (DECL)->decl_common.gimple_reg_flag 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_common GTY(())
{ {
struct tree_decl_minimal common; struct tree_decl_minimal common;
...@@ -2653,7 +2647,6 @@ struct tree_decl_common GTY(()) ...@@ -2653,7 +2647,6 @@ struct tree_decl_common GTY(())
/* Logically, these two would go in a theoretical base shared by var and /* Logically, these two would go in a theoretical base shared by var and
parm decl. */ parm decl. */
unsigned gimple_reg_flag : 1; unsigned gimple_reg_flag : 1;
unsigned call_clobbered_flag : 1;
union tree_decl_u1 { union tree_decl_u1 {
/* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
......
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