Commit 09fa81db by Kazu Hirata Committed by Kazu Hirata

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
parent 1111ad78
2004-10-05 Kazu Hirata <kazu@cs.umass.edu> 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 * tree-cfg.c (cleanup_tree_cfg): Remove variable
something_changed. Simplify the while loop. something_changed. Simplify the while loop.
......
...@@ -723,12 +723,7 @@ cleanup_tree_cfg (void) ...@@ -723,12 +723,7 @@ cleanup_tree_cfg (void)
opportunities for itself, so iterate on it until nothing opportunities for itself, so iterate on it until nothing
changes. */ changes. */
while (thread_jumps ()) 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 #ifdef ENABLE_CHECKING
if (retval) if (retval)
...@@ -3969,9 +3964,6 @@ thread_jumps (void) ...@@ -3969,9 +3964,6 @@ thread_jumps (void)
} }
} }
/* Update the dominators. */
if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
{
/* Remove the unreachable blocks (observe that if all blocks /* Remove the unreachable blocks (observe that if all blocks
were reachable before, only those in the path we threaded were reachable before, only those in the path we threaded
over and did not have any predecessor outside of the path over and did not have any predecessor outside of the path
...@@ -3985,6 +3977,10 @@ thread_jumps (void) ...@@ -3985,6 +3977,10 @@ thread_jumps (void)
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 /* If the dominator of the destination was in the path, set its
dominator to the start of the redirected edge. */ dominator to the start of the redirected edge. */
if (get_immediate_dominator (CDI_DOMINATORS, old_dest) == NULL) if (get_immediate_dominator (CDI_DOMINATORS, old_dest) == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment