diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-18 20:01:31 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-18 20:01:31 +0000 |
commit | 49e6b159a6b2225a0198f8e261c6b6f3772fba3f (patch) | |
tree | 7474601b4ae09317bf0a9ed2647974807abfc493 /gcc/loop-init.c | |
parent | 2fffb07a72d0755a559b08cfa30eb12d277daec1 (diff) | |
download | gcc-49e6b159a6b2225a0198f8e261c6b6f3772fba3f.tar.gz |
2013-02-18 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 196123 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@196126 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r-- | gcc/loop-init.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c index d64c110c1b5..b1954ca484f 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -99,6 +99,9 @@ loop_optimizer_init (unsigned flags) #ifdef ENABLE_CHECKING verify_loop_structure (); #endif + + /* Clear all flags. */ + loops_state_clear (~0U); } /* Apply flags to loops. */ @@ -171,16 +174,19 @@ loop_fini_done: the latch, and loops did not get new subloops (new loops might possibly get created, but we are not interested in them). Fix up the mess. - If CHANGED_BBS is not NULL, basic blocks whose loop has changed are - marked in it. */ + If CHANGED_BBS is not NULL, basic blocks whose loop depth has changed are + marked in it. -void + Returns the number of new discovered loops. */ + +unsigned fix_loop_structure (bitmap changed_bbs) { basic_block bb; int record_exits = 0; loop_iterator li; struct loop *loop; + unsigned old_nloops; timevar_push (TV_LOOP_INIT); @@ -228,6 +234,10 @@ fix_loop_structure (bitmap changed_bbs) delete_loop (loop); } + /* Remember the number of loops so we can return how many new loops + flow_loops_find discovered. */ + old_nloops = number_of_loops (); + /* Re-compute loop structure in-place. */ flow_loops_find (current_loops); @@ -253,6 +263,8 @@ fix_loop_structure (bitmap changed_bbs) #endif timevar_pop (TV_LOOP_INIT); + + return number_of_loops () - old_nloops; } /* Gate for the RTL loop superpass. The actual passes are subpasses. |