2004-10-18 Kazu Hirata <kazu@cs.umass.edu>
+ * tree-cfg.c (cleanup_tree_cfg): Don't iterate on
+ thread_jumps.
+ (thread_jumps): Iterate until no new forwarder block arises.
+
+2004-10-18 Kazu Hirata <kazu@cs.umass.edu>
+
* tree-cfg.c (tree_forwarder_block_p): Don't set forwardable.
(thread_jumps): Use forwardable as cache of
tree_forwarder_block_p throughout the function.
retval = cleanup_control_flow ();
retval |= delete_unreachable_blocks ();
-
- /* thread_jumps sometimes leaves further transformation
- opportunities for itself, so iterate on it until nothing
- changes. */
- while (thread_jumps ())
- retval = true;
+ retval |= thread_jumps ();
#ifdef ENABLE_CHECKING
if (retval)
{
gcc_assert (!cleanup_control_flow ());
gcc_assert (!delete_unreachable_blocks ());
+ gcc_assert (!thread_jumps ());
}
#endif
tree phi;
int arg;
bool retval = false;
+ bool rerun;
FOR_EACH_BB (bb)
bb_ann (bb)->forwardable = tree_forwarder_block_p (bb);
+ restart:
+ rerun = false;
FOR_EACH_BB (bb)
{
edge_iterator ei;
two arms eventually merge without any intervening
statements. */
if (this_jump_threaded && tree_forwarder_block_p (bb))
- bb_ann (bb)->forwardable = true;
+ bb_ann (bb)->forwardable = rerun = true;
}
+ if (rerun)
+ goto restart;
return retval;
}