]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/18307 (merge_pointed_to_info called incorrectly)
authorDiego Novillo <dnovillo@redhat.com>
Wed, 17 Nov 2004 21:07:03 +0000 (21:07 +0000)
committerDiego Novillo <dnovillo@gcc.gnu.org>
Wed, 17 Nov 2004 21:07:03 +0000 (16:07 -0500)
PR tree-optimization/18307
* tree-ssa-alias.c (merge_pointed_to_info): ICE if 'dest' and
'orig' are the same node.
(collect_points_to_info_r): Do not call merge_pointed_to_info
when the PHI argument is identical to the LHS.

From-SVN: r90816

gcc/ChangeLog
gcc/tree-ssa-alias.c

index 932744504a116cdf77faa386ff4f85da39ba796d..6bf212a17f059ee7b15ae849bf8cf95e9d2e31eb 100644 (file)
@@ -1,3 +1,11 @@
+2004-11-17  Diego Novillo  <dnovillo@redhat.com>
+
+       PR tree-optimization/18307
+       * tree-ssa-alias.c (merge_pointed_to_info): ICE if 'dest' and
+       'orig' are the same node.
+       (collect_points_to_info_r): Do not call merge_pointed_to_info
+       when the PHI argument is identical to the LHS.
+
 2004-11-17  Steven Bosscher  <stevenb@suse.de>
 
        * tree-ssa-propagate.c (cfg_blocks_add) Assert we're not trying
index 2da76ce6bb5914ddc39821d69a07b1d81662484c..aee68d3c58c7cf76e62297800d0076e76b92cc66 100644 (file)
@@ -1697,12 +1697,8 @@ merge_pointed_to_info (struct alias_info *ai, tree dest, tree orig)
 {
   struct ptr_info_def *dest_pi, *orig_pi;
 
-  /* FIXME: It is erroneous to call this function with identical
-     nodes, however that currently occurs during bootstrap.  This check
-     stops further breakage.  PR 18307 documents the issue.  */
-  if (dest == orig)
-    return;
-  
+  gcc_assert (dest != orig);
+
   /* Make sure we have points-to information for ORIG.  */
   collect_points_to_info_for (ai, orig);
 
@@ -1938,7 +1934,9 @@ collect_points_to_info_r (tree var, tree stmt, void *data)
            break;
            
          case SSA_NAME:
-           merge_pointed_to_info (ai, lhs, var);
+           /* Avoid unnecessary merges.  */
+           if (lhs != var)
+             merge_pointed_to_info (ai, lhs, var);
            break;
            
          default:
This page took 0.080142 seconds and 5 git commands to generate.