[PATCH] Use reversed_comparison_code in sched-deps.c

Richard Earnshaw rearnsha@gcc.gnu.org
Mon Aug 30 12:46:00 GMT 2004


On Mon, 2004-08-30 at 11:49, Andreas Schwab wrote:
> Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk> writes:
> 
> > 	* sched-deps.c (get_condition): Fix breakage in previous patch.
> 
> This breaks ia64, genrecog is apparently being miscompiled by the stage1
> compiler and crashes.
> 

I think it's more likely that the patch is throwing up latent bugs in
the scheduler than that this patch is directly at fault.  Certainly this
is what overnight testing suggests is happening on ARM now.

For example, prior to this patch we never correctly extracted the
condition of a conditional jump, so it was impossible for the scheduler
to be able to rearrange cond_exec insns and a final conditional branch
insn.  That meant that a sequence such as:

(cond_exec (eq...) (set x y)

(set pc (if_then_else (ne ...)(label) (pc)))

would always be scheduled in that order.

It's now possible for the scheduler to move the jump before the
cond_exec (in general it should do this if the cond_exec insn can't be
used to fill a scheduling slot), but it then fails to correctly handle
the fall-out (there's a fundamental assumption that the last insn in the
basic block is a jump insn -- so we really need to split the post jump
insns created by this optimization into a new bb).

Unless somebody knows how to simply address the fallout, I think I'm
going to disable get_condition from looking inside a condjump insn for
now until I can find time to look at the issues this all raises.

R.



More information about the Gcc-patches mailing list