summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-20 21:49:12 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-20 21:49:12 +0000
commitc9c81ef3c667aaa14c498a5449ec6d134b4b66ff (patch)
tree0ac440db6513ee01deb5e5dc6142769d1e5b7b2d /gcc/cfgexpand.c
parent12cdcb9d74f55c165366ca1b1eeec013a0ce72ef (diff)
parent891196d7325e4c55d92d5ac5cfe7161c4f36c0ce (diff)
downloadgcc-fortran-dev.tar.gz
Merge from trunk (r239915 to r240230)fortran-dev
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/fortran-dev@240290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 130a16b1d7d..4190f7f0aed 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -815,16 +815,15 @@ update_alias_info_with_stack_vars (void)
if (decls_to_partitions)
{
unsigned i;
+ tree name;
hash_set<bitmap> visited;
bitmap temp = BITMAP_ALLOC (&stack_var_bitmap_obstack);
- for (i = 1; i < num_ssa_names; i++)
+ FOR_EACH_SSA_NAME (i, name, cfun)
{
- tree name = ssa_name (i);
struct ptr_info_def *pi;
- if (name
- && POINTER_TYPE_P (TREE_TYPE (name))
+ if (POINTER_TYPE_P (TREE_TYPE (name))
&& ((pi = SSA_NAME_PTR_INFO (name)) != NULL))
add_partitioned_vars_to_ptset (&pi->pt, decls_to_partitions,
&visited, temp);
@@ -1009,7 +1008,7 @@ expand_one_stack_var_at (tree decl, rtx base, unsigned base_align,
important, we'll simply use the alignment that is already set. */
if (base == virtual_stack_vars_rtx)
offset -= frame_phase;
- align = offset & -offset;
+ align = least_bit_hwi (offset);
align *= BITS_PER_UNIT;
if (align == 0 || align > base_align)
align = base_align;
@@ -6270,16 +6269,15 @@ pass_expand::execute (function *fun)
/* Now propagate the RTL assignment of each partition to the
underlying var of each SSA_NAME. */
- for (i = 1; i < num_ssa_names; i++)
- {
- tree name = ssa_name (i);
+ tree name;
- if (!name
- /* We might have generated new SSA names in
- update_alias_info_with_stack_vars. They will have a NULL
- defining statements, and won't be part of the partitioning,
- so ignore those. */
- || !SSA_NAME_DEF_STMT (name))
+ FOR_EACH_SSA_NAME (i, name, cfun)
+ {
+ /* We might have generated new SSA names in
+ update_alias_info_with_stack_vars. They will have a NULL
+ defining statements, and won't be part of the partitioning,
+ so ignore those. */
+ if (!SSA_NAME_DEF_STMT (name))
continue;
adjust_one_expanded_partition_var (name);
@@ -6288,17 +6286,15 @@ pass_expand::execute (function *fun)
/* Clean up RTL of variables that straddle across multiple
partitions, and check that the rtl of any PARM_DECLs that are not
cleaned up is that of their default defs. */
- for (i = 1; i < num_ssa_names; i++)
+ FOR_EACH_SSA_NAME (i, name, cfun)
{
- tree name = ssa_name (i);
int part;
- if (!name
- /* We might have generated new SSA names in
- update_alias_info_with_stack_vars. They will have a NULL
- defining statements, and won't be part of the partitioning,
- so ignore those. */
- || !SSA_NAME_DEF_STMT (name))
+ /* We might have generated new SSA names in
+ update_alias_info_with_stack_vars. They will have a NULL
+ defining statements, and won't be part of the partitioning,
+ so ignore those. */
+ if (!SSA_NAME_DEF_STMT (name))
continue;
part = var_to_partition (SA.map, name);
if (part == NO_PARTITION)