This is the mail archive of the
mailing list for the GCC project.
Re: [patch] fix pr22550
On Tue, Jul 26, 2005 at 09:32:09AM -0400, Andrew Pinski wrote:
> > Well, it looks like we need to return to the old cleanup cycle.
> > In some cases (loop-5.c at -O3) we need 3 rounds of:
> > cleanup_control_flow()
> > delete_unreachable_blocks()
> > cleanup_forwarder_blocks()
> > merge_seq_blocks()
> Can't we just stop merge_seq_blocks from doing CCP's job?
Well, we need to stop it from doing CCP because of the SSA update
issue (wasn't that patch applied already?).
However, it's not just CCP. Any kind of propagation done in
merge_seq_blocks() that may fold a predicate can trigger this.
Though it would fix this particular case, it would not fix
# BLOCK 1
x_3 = PHI <y_2>
# BLOCK 2
if (y_2 == x_3)
After merge_seq_blocks() that if() at block 2 will be folded.
I forgot about the third alternative, which is to just make
optimizers handle no-op conditionals (as in James' original