aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2005-08-19 18:52:55 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2005-08-19 14:52:55 -0400
commite3594cb39e95c81f8b7c53a704fc53e744b592ab (patch)
tree8df62d5f004cb564c17c31a6b47dfa190aa82d32 /gcc
parent52270a3cb5384afea9773dfc122412a0fcf5957e (diff)
downloadgcc-e3594cb39e95c81f8b7c53a704fc53e744b592ab.zip
gcc-e3594cb39e95c81f8b7c53a704fc53e744b592ab.tar.gz
gcc-e3594cb39e95c81f8b7c53a704fc53e744b592ab.tar.bz2
tree-cfgcleanup.c (cleanup_tree_cfg): Fix flowgraph change indicator.
* tree-cfgcleanup.c (cleanup_tree_cfg): Fix flowgraph change indicator. Return true if the flowgraph changed during cleanup. From-SVN: r103291
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-cfgcleanup.c15
2 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f19ee5c..8d37b88 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2005-08-19 Diego Novillo <dnovillo@redhat.com>
+ * tree-cfgcleanup.c (cleanup_tree_cfg): Fix flowgraph change
+ indicator. Return true if the flowgraph changed during
+ cleanup.
+
+2005-08-19 Diego Novillo <dnovillo@redhat.com>
+
PR 23476
* tree-cfgcleanup.c (cleanup_control_expr_graph): Fold the
conditional expression before testing its value.
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 0f8bfc5..7e719c1 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. */