* [PATCH] Pushing out more LIM TLC patches
@ 2013-03-21 12:34 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2013-03-21 12:34 UTC (permalink / raw)
To: gcc-patches
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
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.
Index: trunk/gcc/tree-ssa-loop-im.c
===================================================================
*** trunk.orig/gcc/tree-ssa-loop-im.c 2013-03-14 11:50:55.000000000 +0100
--- trunk/gcc/tree-ssa-loop-im.c 2013-03-14 11:52:08.744186528 +0100
*************** can_sm_ref_p (struct loop *loop, mem_ref
*** 2315,2324 ****
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)
--- 2315,2320 ----
*************** can_sm_ref_p (struct loop *loop, mem_ref
*** 2354,2360 ****
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];
unsigned i;
bitmap_iterator bi;
mem_ref_p ref;
--- 2350,2356 ----
static void
find_refs_for_sm (struct loop *loop, bitmap sm_executed, bitmap refs_to_sm)
{
! bitmap refs = memory_accesses.all_refs_stored_in_loop[loop->num];
unsigned i;
bitmap_iterator bi;
mem_ref_p ref;
*************** store_motion_loop (struct loop *loop, bi
*** 2394,2400 ****
{
vec<edge> exits = get_loop_exit_edges (loop);
struct loop *subloop;
! bitmap sm_in_loop = BITMAP_ALLOC (NULL);
if (loop_suitable_for_sm (loop, exits))
{
--- 2390,2396 ----
{
vec<edge> exits = get_loop_exit_edges (loop);
struct loop *subloop;
! bitmap sm_in_loop = BITMAP_ALLOC (&lim_bitmap_obstack);
if (loop_suitable_for_sm (loop, exits))
{
*************** static void
*** 2417,2423 ****
store_motion (void)
{
struct loop *loop;
! bitmap sm_executed = BITMAP_ALLOC (NULL);
for (loop = current_loops->tree_root->inner; loop != NULL; loop = loop->next)
store_motion_loop (loop, sm_executed);
--- 2413,2419 ----
store_motion (void)
{
struct loop *loop;
! 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-21 12:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-21 12:34 [PATCH] Pushing out more LIM TLC patches Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).