[tree-ssa] Avoid jump threading from producing irreducible regions

law@redhat.com law@redhat.com
Fri Nov 21 21:34:00 GMT 2003


In message <20031121152630.GV12030@kam.mff.cuni.cz>, Jan Hubicka writes:
 >Hi,
 >as discussed earlier, I believe we must avoid producing irreducible
 >loops in early stages of compilation as disabling loop optimizations for
 >no good reason can be disasterous.
 >regtested/bootstrapped i386
 >OK?
 >
 >2003-11-21  Jan Hubicka  <jh@suse.cz>
 >	* tree-ssa.dom.c (tree_ssa_domionator_thread_jumps): Mark back edges.
 >	(thread_across_edge): Do not thread across loop headers.
Note that the threader is run in two modes.

The first (and the one you changed) is allowed to thread through blocks
which begin with PHI nodes.

The second runs as part of the dominator optimizer, but is not allowed to
thread through a block with PHI nodes.  You didn't change the behavior of
this instance.

[ Note I fully expect that with Andrew's changes that we'll have a single
  mode for the dominator based jump threader in the future. ]

Anyway, I'm guessing that you don't have to worry about the second mode
(no threading through PHIs) since loops are going to have a PHI at the
the block which starts the natural loop.  Right?

jeff




More information about the Gcc-patches mailing list