diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2004-09-16 18:45:33 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2004-09-16 18:45:33 +0000 |
commit | 49f48e9ffca06f9a945da052f04e67f509e00205 (patch) | |
tree | 2745e6d5213d5831b375b7e3991cca3abb14e1e8 | |
parent | f67d92e937b860e1f8d832c8de8249dbc7d657c3 (diff) | |
download | gcc-49f48e9ffca06f9a945da052f04e67f509e00205.zip gcc-49f48e9ffca06f9a945da052f04e67f509e00205.tar.gz gcc-49f48e9ffca06f9a945da052f04e67f509e00205.tar.bz2 |
re PR tree-optimization/17517 (ICE: SSA corruption)
2004-09-16 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/17517
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
coalesce same-root variables without checking for abnormal PHI usage.
From-SVN: r87609
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 20 |
2 files changed, 16 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 265495f..72b17b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-16 Andrew MacLeod <amacleod@redhat.com> + + PR tree-optimization/17517 + * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't + coalesce same-root variables without checking for abnormal PHI usage. + 2004-09-16 Daniel Berlin <dberlin@dberlin.org> * cfgloop.h (duplicate_loop): Add prototype. diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 494e3a5..49225d0 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -169,6 +169,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; + } + /* Partitions already have the same root, simply merge them. */ if (root1 == root2) { @@ -251,16 +261,6 @@ 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); |