aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copyrename.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-copyrename.c')
-rw-r--r--gcc/tree-ssa-copyrename.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c
index 3e01b6e..6ee8380 100644
--- a/gcc/tree-ssa-copyrename.c
+++ b/gcc/tree-ssa-copyrename.c
@@ -194,20 +194,21 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug)
ign1 = TREE_CODE (root1) == VAR_DECL && DECL_IGNORED_P (root1);
ign2 = TREE_CODE (root2) == VAR_DECL && DECL_IGNORED_P (root2);
- /* Never attempt to coalesce 2 user variables unless one is an inline
- variable. */
+ /* Refrain from coalescing user variables, if requested. */
if (!ign1 && !ign2)
{
- if (DECL_FROM_INLINE (root2))
- ign2 = true;
- else if (DECL_FROM_INLINE (root1))
+ if (flag_ssa_coalesce_vars && DECL_FROM_INLINE (root2))
+ ign2 = true;
+ else if (flag_ssa_coalesce_vars && DECL_FROM_INLINE (root1))
ign1 = true;
- else
+ else if (flag_ssa_coalesce_vars != 2)
{
if (debug)
fprintf (debug, " : 2 different USER vars. No coalesce.\n");
return false;
}
+ else
+ ign2 = true;
}
/* If both values have default defs, we can't coalesce. If only one has a