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
This commit is contained in:
parent
d586d6d1f6
commit
b730fa614c
6 changed files with 26 additions and 20 deletions
|
@ -1,3 +1,13 @@
|
|||
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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue