[Patch] Fix PR41440 bad edge insertion

Steven Bosscher stevenb.gcc@gmail.com
Thu Oct 1 13:55:00 GMT 2009


On Thu, Oct 1, 2009 at 3:44 PM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Thu, 1 Oct 2009, andrewhutchinson@cox.net wrote:
>
>> After discussion with Micael Matz, the preferred method is fix the
>> problem at the point of RTL expansion. A block that ends with a jump
>> created by RTL expander on an otherwise fallthru edge, is now padded
>> with mov(r,r) NOP.
>
> I can't approve this but (obviously) think this is the right way.  In
> addition you might want to pad only when something is queued on that edge
> (edge->r.insns != NULL) to not generate excessive nop moves.  Probably
> doesn't matter that much, though.

I don't like this approach at all, for two reasons:

1. Garbage rtl generated (a reg and an insn)
2. Looks like it papers over a problem (insns inserted in  the wrong place).

Ciao!
Steven



More information about the Gcc-patches mailing list