+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
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)
{
}
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;
}
}
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