]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace.
authorRichard Guenther <rguenther@suse.de>
Mon, 5 Sep 2011 10:31:04 +0000 (10:31 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 5 Sep 2011 10:31:04 +0000 (10:31 +0000)
2011-09-05  Richard Guenther  <rguenther@suse.de>

* tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace.

From-SVN: r178527

gcc/ChangeLog
gcc/tree-cfg.c

index ab05faa1d03e887bb091233c98ae31e53e338668..0f9280245306adcb758313a3c26db206b2d7664a 100644 (file)
@@ -1,3 +1,7 @@
+2011-09-05  Richard Guenther  <rguenther@suse.de>
+
+       * tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace.
+
 2011-09-05  Richard Guenther  <rguenther@suse.de>
 
        * stor-layout.c (layout_type): Use size_binop for array size
index 62e2da0c12f5004afe035dbee50de31b1dc2a91b..20feff91f72755fe1bcd316bf71ba3250de7401f 100644 (file)
@@ -1566,9 +1566,11 @@ replace_uses_by (tree name, tree val)
 
       if (gimple_code (stmt) != GIMPLE_PHI)
        {
+         gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
          size_t i;
 
-         fold_stmt_inplace (stmt);
+         fold_stmt (&gsi);
+         stmt = gsi_stmt (gsi);
          if (cfgcleanup_altered_bbs && !is_gimple_debug (stmt))
            bitmap_set_bit (cfgcleanup_altered_bbs, gimple_bb (stmt)->index);