]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2013-03-21 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Mar 2013 12:35:03 +0000 (12:35 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Mar 2013 12:35:03 +0000 (12:35 +0000)
* tree-ssa-loop-im.c (can_sm_ref_p): Do not test whether
ref is stored in the loop.
(find_refs_for_sm): Walk only over all stores.
(store_motion_loop): Allocate from lim_bitmap_obstack.
(store_motion): Likewise.

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

gcc/ChangeLog
gcc/tree-ssa-loop-im.c

index 9bda6e1d650695d293322fe2c926f496a04640d9..203af600083eba104612221c7cbe2b9e8f9e76d2 100644 (file)
@@ -1,3 +1,11 @@
+2013-03-21  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-loop-im.c (can_sm_ref_p): Do not test whether
+       ref is stored in the loop.
+       (find_refs_for_sm): Walk only over all stores.
+       (store_motion_loop): Allocate from lim_bitmap_obstack.
+       (store_motion): Likewise.
+
 2013-03-21  Richard Biener  <rguenther@suse.de>
 
        * tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge):
index 9dc40451c1dc7843529603f7aa48704923553542..2557542f09ecbc108a52ba1ff91d5146b5f32520 100644 (file)
@@ -2378,10 +2378,6 @@ can_sm_ref_p (struct loop *loop, mem_ref_p ref)
   if (!MEM_ANALYZABLE (ref))
     return false;
 
-  /* Unless the reference is stored in the loop, there is nothing to do.  */
-  if (!bitmap_bit_p (ref->stored, loop->num))
-    return false;
-
   /* It should be movable.  */
   if (!is_gimple_reg_type (TREE_TYPE (ref->mem.ref))
       || TREE_THIS_VOLATILE (ref->mem.ref)
@@ -2417,7 +2413,7 @@ can_sm_ref_p (struct loop *loop, mem_ref_p ref)
 static void
 find_refs_for_sm (struct loop *loop, bitmap sm_executed, bitmap refs_to_sm)
 {
-  bitmap refs = memory_accesses.all_refs_in_loop[loop->num];
+  bitmap refs = memory_accesses.all_refs_stored_in_loop[loop->num];
   unsigned i;
   bitmap_iterator bi;
   mem_ref_p ref;
@@ -2457,7 +2453,7 @@ store_motion_loop (struct loop *loop, bitmap sm_executed)
 {
   vec<edge> exits = get_loop_exit_edges (loop);
   struct loop *subloop;
-  bitmap sm_in_loop = BITMAP_ALLOC (NULL);
+  bitmap sm_in_loop = BITMAP_ALLOC (&lim_bitmap_obstack);
 
   if (loop_suitable_for_sm (loop, exits))
     {
@@ -2480,7 +2476,7 @@ static void
 store_motion (void)
 {
   struct loop *loop;
-  bitmap sm_executed = BITMAP_ALLOC (NULL);
+  bitmap sm_executed = BITMAP_ALLOC (&lim_bitmap_obstack);
 
   for (loop = current_loops->tree_root->inner; loop != NULL; loop = loop->next)
     store_motion_loop (loop, sm_executed);