re PR tree-optimization/36339 (not call clobbering variable for non common offset)
2008-05-28 Richard Guenther <rguenther@suse.de> PR tree-optimization/36339 * tree-ssa-alias.c (set_initial_properties): Move pt_anything and clobbering code out of the loop. From-SVN: r136100
This commit is contained in:
parent
963fc8d00b
commit
38154e4f0f
2 changed files with 25 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-05-28 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/36339
|
||||
* tree-ssa-alias.c (set_initial_properties): Move pt_anything
|
||||
and clobbering code out of the loop.
|
||||
|
||||
2008-05-28 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||
|
||||
* config/s390/constraints.md ('b', 'C', 'D', 'e'): New constraint
|
||||
|
|
|
@ -521,6 +521,8 @@ set_initial_properties (struct alias_info *ai)
|
|||
referenced_var_iterator rvi;
|
||||
tree var;
|
||||
tree ptr;
|
||||
bool any_pt_anything = false;
|
||||
enum escape_type pt_anything_mask = 0;
|
||||
|
||||
FOR_EACH_REFERENCED_VAR (var, rvi)
|
||||
{
|
||||
|
@ -573,19 +575,8 @@ set_initial_properties (struct alias_info *ai)
|
|||
}
|
||||
else if (pi->pt_anything)
|
||||
{
|
||||
bitmap_iterator bi;
|
||||
unsigned int j;
|
||||
|
||||
/* If we do not have the points-to set filled out we
|
||||
still need to honor that this escaped pointer points
|
||||
to anything. */
|
||||
EXECUTE_IF_SET_IN_BITMAP (gimple_addressable_vars (cfun),
|
||||
0, j, bi)
|
||||
{
|
||||
tree var = referenced_var (j);
|
||||
if (!unmodifiable_var_p (var))
|
||||
mark_call_clobbered (var, pi->escape_mask);
|
||||
}
|
||||
any_pt_anything = true;
|
||||
pt_anything_mask |= pi->escape_mask;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -619,6 +610,21 @@ set_initial_properties (struct alias_info *ai)
|
|||
MTAG_GLOBAL (tag) = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* If a pt_anything pointer escaped we need to mark all addressable
|
||||
variables call clobbered. */
|
||||
if (any_pt_anything)
|
||||
{
|
||||
bitmap_iterator bi;
|
||||
unsigned int j;
|
||||
|
||||
EXECUTE_IF_SET_IN_BITMAP (gimple_addressable_vars (cfun), 0, j, bi)
|
||||
{
|
||||
tree var = referenced_var (j);
|
||||
if (!unmodifiable_var_p (var))
|
||||
mark_call_clobbered (var, pt_anything_mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Compute which variables need to be marked call clobbered because
|
||||
|
|
Loading…
Add table
Reference in a new issue