aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-10-05 18:53:08 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-10-05 18:53:08 +0000
commit09fa81dbb7a6c892b01bac7e8193316fd1428d36 (patch)
tree7fae4898199d1fdc2587f07810eabd58a25e5843 /gcc
parent1111ad788aeaa829e581c310efbd36f6d66bdbb0 (diff)
downloadgcc-09fa81dbb7a6c892b01bac7e8193316fd1428d36.zip
gcc-09fa81dbb7a6c892b01bac7e8193316fd1428d36.tar.gz
gcc-09fa81dbb7a6c892b01bac7e8193316fd1428d36.tar.bz2
tree-cfg.c (cleanup_tree_cfg): Don't call delete_unreachable_blosk() after thread_jumps().
* tree-cfg.c (cleanup_tree_cfg): Don't call delete_unreachable_blosk() after thread_jumps(). (thread_jumps): Always remove basic blocks as they become unreachable. From-SVN: r88565
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-cfg.c34
2 files changed, 22 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4dd7008..7ef42ea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2004-10-05 Kazu Hirata <kazu@cs.umass.edu>
+ * tree-cfg.c (cleanup_tree_cfg): Don't call
+ delete_unreachable_blosk() after thread_jumps().
+ (thread_jumps): Always remove basic blocks as they become
+ unreachable.
+
+2004-10-05 Kazu Hirata <kazu@cs.umass.edu>
+
* tree-cfg.c (cleanup_tree_cfg): Remove variable
something_changed. Simplify the while loop.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 0c36f3e..afeb4de 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -723,12 +723,7 @@ cleanup_tree_cfg (void)
opportunities for itself, so iterate on it until nothing
changes. */
while (thread_jumps ())
- {
- /* delete_unreachable_blocks() does its job only when
- thread_jumps() produces more unreachable blocks. */
- delete_unreachable_blocks ();
- retval = true;
- }
+ retval = true;
#ifdef ENABLE_CHECKING
if (retval)
@@ -3969,22 +3964,23 @@ thread_jumps (void)
}
}
- /* Update the dominators. */
- if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
+ /* Remove the unreachable blocks (observe that if all blocks
+ were reachable before, only those in the path we threaded
+ over and did not have any predecessor outside of the path
+ become unreachable). */
+ for (; old_dest != dest; old_dest = tmp)
{
- /* Remove the unreachable blocks (observe that if all blocks
- were reachable before, only those in the path we threaded
- over and did not have any predecessor outside of the path
- become unreachable). */
- for (; old_dest != dest; old_dest = tmp)
- {
- tmp = EDGE_SUCC (old_dest, 0)->dest;
+ tmp = EDGE_SUCC (old_dest, 0)->dest;
- if (EDGE_COUNT (old_dest->preds) > 0)
- break;
+ if (EDGE_COUNT (old_dest->preds) > 0)
+ break;
- delete_basic_block (old_dest);
- }
+ delete_basic_block (old_dest);
+ }
+
+ /* Update the dominators. */
+ if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
+ {
/* If the dominator of the destination was in the path, set its
dominator to the start of the redirected edge. */
if (get_immediate_dominator (CDI_DOMINATORS, old_dest) == NULL)