Commit a78e238e by Andrew MacLeod Committed by Andrew Macleod

re PR tree-optimization/17400 (out of SSA corruption)


2004-09-13  Andrew MacLeod  <amacleod@redhat.com>

	PR tree-optimization/17400
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
	coalesce partitions when one occurs in an abnormal PHI.

From-SVN: r87443
parent 5547b982
2004-09-13 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/17400
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
coalesce partitions when one occurs in an abnormal PHI.
2004-09-13 Andrew Pinski <apinski@apple.com>
* config/rs6000/darwin.h (ASM_OUTPUT_COMMON): Change variable size's
......
......@@ -116,8 +116,9 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug)
{
int p1, p2, p3;
tree root1, root2;
tree rep1, rep2;
var_ann_t ann1, ann2, ann3;
bool ign1, ign2;
bool ign1, ign2, abnorm;
gcc_assert (TREE_CODE (var1) == SSA_NAME);
gcc_assert (TREE_CODE (var2) == SSA_NAME);
......@@ -140,8 +141,10 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug)
gcc_assert (p1 != NO_PARTITION);
gcc_assert (p2 != NO_PARTITION);
root1 = SSA_NAME_VAR (partition_to_var (map, p1));
root2 = SSA_NAME_VAR (partition_to_var (map, p2));
rep1 = partition_to_var (map, p1);
rep2 = partition_to_var (map, p2);
root1 = SSA_NAME_VAR (rep1);
root2 = SSA_NAME_VAR (rep2);
if (DECL_HARD_REGISTER (root1) || DECL_HARD_REGISTER (root2))
{
......@@ -248,6 +251,16 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug)
return;
}
/* Don't coalesce if one of the variables occurs in an abnormal PHI. */
abnorm = (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rep1)
|| SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rep2));
if (abnorm)
{
if (debug)
fprintf (debug, " : Abnormal PHI barrier. No coalesce.\n");
return;
}
/* Merge the two partitions. */
p3 = partition_union (map->var_partition, p1, p2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment