OSDN Git Service

2008-05-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-loop-im.c
index ba36343..8740030 100644 (file)
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "hashtab.h"
 #include "tree-affine.h"
 #include "pointer-set.h"
+#include "tree-ssa-propagate.h"
 
 /* TODO:  Support for predicated code motion.  I.e.
 
@@ -900,6 +901,14 @@ determine_invariantness_stmt (struct dom_walk_data *dw_data ATTRIBUTE_UNUSED,
              maybe_never = true;
              outermost = NULL;
            }
+         /* Make sure to note always_executed_in for stores to make
+            store-motion work.  */
+         else if (stmt_makes_single_store (stmt))
+           {
+             stmt_ann (stmt)->common.aux
+               = xcalloc (1, sizeof (struct lim_aux_data));
+             LIM_DATA (stmt)->always_executed_in = outermost;
+           }
          continue;
        }