+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):
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)
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;
{
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))
{
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);