diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-19 18:52:55 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-19 18:52:55 +0000 |
commit | 9ff23274c4d36415777b522fe4b09c95b26a5559 (patch) | |
tree | 8df62d5f004cb564c17c31a6b47dfa190aa82d32 /gcc/tree-cfgcleanup.c | |
parent | 8df8d61f081139c519c2250e16f1880a5c0eb4a2 (diff) | |
download | ppe42-gcc-9ff23274c4d36415777b522fe4b09c95b26a5559.tar.gz ppe42-gcc-9ff23274c4d36415777b522fe4b09c95b26a5559.zip |
* tree-cfgcleanup.c (cleanup_tree_cfg): Fix flowgraph change
indicator. Return true if the flowgraph changed during
cleanup.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103291 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 0f8bfc5ec1b..7e719c1dc33 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -523,17 +523,24 @@ cleanup_tree_cfg_1 (void) } -/* Remove unreachable blocks and other miscellaneous clean up work. */ +/* Remove unreachable blocks and other miscellaneous clean up work. + Return true if the flowgraph was modified, false otherwise. */ bool cleanup_tree_cfg (void) { - bool retval; + bool retval, changed; timevar_push (TV_TREE_CLEANUP_CFG); + /* Iterate until there are no more cleanups left to do. If any + iteration changed the flowgraph, set CHANGED to true. */ + changed = false; do - retval = cleanup_tree_cfg_1 (); + { + retval = cleanup_tree_cfg_1 (); + changed |= retval; + } while (retval); compact_blocks (); @@ -544,7 +551,7 @@ cleanup_tree_cfg (void) timevar_pop (TV_TREE_CLEANUP_CFG); - return retval; + return changed; } /* Cleanup cfg and repair loop structures. */ |