]> gcc.gnu.org Git - gcc.git/commitdiff
tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate constants everywhere.
authorRichard Guenther <rguenther@suse.de>
Wed, 7 Apr 2010 14:34:35 +0000 (14:34 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 7 Apr 2010 14:34:35 +0000 (14:34 +0000)
2010-04-07  Richard Guenther  <rguenther@suse.de>

* tree-ssa-forwprop.c (forward_propagate_addr_expr):
Propagate constants everywhere.

From-SVN: r158063

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

index 0840425687f7fae960a685770d492649023f5727..20aa611e134dbe40c063304bc8cd4863a1c5d9e9 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-07  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-forwprop.c (forward_propagate_addr_expr):
+       Propagate constants everywhere.
+
 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/43516
index 215179593701a11203985e4756b479ba3a70319b..d7d378b0f929c4f84b61af80d9ce05f06676bd3f 100644 (file)
@@ -955,9 +955,10 @@ forward_propagate_addr_expr (tree name, tree rhs)
        }
 
       /* If the use is in a deeper loop nest, then we do not want
-        to propagate the ADDR_EXPR into the loop as that is likely
-        adding expression evaluations into the loop.  */
-      if (gimple_bb (use_stmt)->loop_depth > stmt_loop_depth)
+        to propagate non-invariant ADDR_EXPRs into the loop as that
+        is likely adding expression evaluations into the loop.  */
+      if (gimple_bb (use_stmt)->loop_depth > stmt_loop_depth
+         && !is_gimple_min_invariant (rhs))
        {
          all = false;
          continue;
This page took 0.079665 seconds and 5 git commands to generate.