Commit 26d4492f by Kazu Hirata Committed by Kazu Hirata

tree-cfg.c (cleanup_tree_cfg): Speed up by calling delete_unrechable_blocks() only when necessary.

	* tree-cfg.c (cleanup_tree_cfg): Speed up by calling
	delete_unrechable_blocks() only when necessary.

From-SVN: r88419
parent ee0f32f4
2004-10-02 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (cleanup_tree_cfg): Speed up by calling
delete_unrechable_blocks() only when necessary.
2004-10-02 P.J. Darcy <darcypj@us.ibm.com> 2004-10-02 P.J. Darcy <darcypj@us.ibm.com>
* gthr-tpf.h (__gthread_recursive_mutex_t): New type. * gthr-tpf.h (__gthread_recursive_mutex_t): New type.
......
...@@ -718,19 +718,29 @@ cleanup_tree_cfg (void) ...@@ -718,19 +718,29 @@ cleanup_tree_cfg (void)
timevar_push (TV_TREE_CLEANUP_CFG); timevar_push (TV_TREE_CLEANUP_CFG);
retval = cleanup_control_flow (); retval = cleanup_control_flow ();
retval |= delete_unreachable_blocks ();
/* These two transformations can cascade, so we iterate on them until /* thread_jumps() sometimes leaves further transformation
nothing changes. */ opportunities for itself, so iterate on it until nothing
changes. */
while (something_changed) while (something_changed)
{ {
something_changed = delete_unreachable_blocks (); something_changed = thread_jumps ();
something_changed |= thread_jumps ();
/* delete_unreachable_blocks() does its job only when
thread_jumps() produces more unreachable blocks. */
if (something_changed)
delete_unreachable_blocks ();
retval |= something_changed; retval |= something_changed;
} }
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
if (retval) if (retval)
gcc_assert (!cleanup_control_flow ()); {
gcc_assert (!cleanup_control_flow ());
gcc_assert (!delete_unreachable_blocks ());
}
#endif #endif
/* Merging the blocks creates no new opportunities for the other /* Merging the blocks creates no new opportunities for the other
......
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