OSDN Git Service

2011-09-05 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Sep 2011 10:31:04 +0000 (10:31 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Sep 2011 10:31:04 +0000 (10:31 +0000)
* tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178527 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-cfg.c

index ab05faa..0f92802 100644 (file)
@@ -1,5 +1,9 @@
 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
        calculations.
 
index 62e2da0..20feff9 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);