On Wed, 6 Aug 2014, Richard Biener wrote:

> 
> The following fixes the remaining ICEs I see when testing all
> languages (but ada and go).
> 
> The tree-cfg.c hunk highlights one change in the behavior
> of fold_stmt, namely that it now follows SSA edges by default.
> Maybe that's undesired?  On a related note, fold_stmt_inplace
> preserves the actual statement object gsi_stmt points to,
> but in reality callers use it to avoid creating new SSA names
> thus would it be ok if fold_stmt_inplace made sure to
> preserve the number of statements (and only change what
> gsi points to) only?
> 
> Bootstrapped / tested on x86_64-unknown-linux-gnu, applied.

The following clarifies the comment.

Richard.

2014-08-06  Richard Biener  <rguent...@suse.de>

        * tree-cfg.c (replace_uses_by): Clarify added comment.

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c      (revision 213655)
+++ gcc/tree-cfg.c      (working copy)
@@ -1748,11 +1748,12 @@ replace_uses_by (tree name, tree val)
          /* If we have sth like
               neighbor_29 = <name> + -1;
               _33 = <name> + neighbor_29;
-            and end up visiting _33 first then folding will
-            simplify the stmt to _33 = <name>; and the new
-            immediate use will be inserted before the stmt
-            iterator marker and thus we fail to visit it
-            again, ICEing within the has_zero_uses assert.
+            and substitute 1 for <name> then when visiting
+            _33 first then folding will simplify the stmt
+            to _33 = <name>; and the new immediate use will
+            be inserted before the stmt iterator marker and
+            thus we fail to visit it again, ICEing within the
+            has_zero_uses assert.
             Avoid that by never following SSA edges.  */
          if (fold_stmt (&gsi, no_follow_ssa_edges))
            stmt = gsi_stmt (gsi);

Reply via email to