This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix PR rtl-optimization/87727
- From: Jeff Law <law at redhat dot com>
- To: Peter Bergner <bergner at linux dot ibm dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Jakub Jelinek <jakub at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Vladimir Makarov <vmakarov at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 20 Dec 2018 15:41:13 -0700
- Subject: Re: [patch] Fix PR rtl-optimization/87727
- References: <3499484.ePniFpkjG6@polaris> <20181220122357.GP23305@tucnak> <20181220193133.GV3803@gate.crashing.org> <5406591.1PUeVzC3DK@polaris> <20181220202635.GW3803@gate.crashing.org> <firstname.lastname@example.org>
On 12/20/18 2:30 PM, Peter Bergner wrote:
> On 12/20/18 2:26 PM, Segher Boessenkool wrote:
>> On Thu, Dec 20, 2018 at 09:07:41PM +0100, Eric Botcazou wrote:
>>>> It's not a terrible workaround, no. It looks like it will make some asm
>>>> once again fail though? If argument registers are forwarded to in the asm.
>>> The combiner change looks like a big hammer for such a corner case though.
>> That isn't the primary goal, no; the primary goal is to get better RA (by
>> not having the combiner do RA's work, and doing a mediocre job of it). It
>> does solve these problems though.
> My recent RA patches improved conflict information by noticing when we
> don't need a conflict for a copy insn between a hard reg and a pseudo
> when the source operand is live past the copy. However, conflict info
> for copies between two pseudos wasn't affected because IRA/LRA computes
> liveness differently for pseudos than for hard regs. I have seen copies
> between two pseudos still get to RA and we're not able to do anything
> about them at the moment because we still think they conflict.
> For stage1, I'd like to fix that conflict wart if I can. I have also
> wondered about adding a copy coalesce phase just before we enter RA,
> which would ensure the copies are removed, instead of hoping RA assigns
> the same reg to the source and destination of the copy making it a nop
> that can be removed.
The difficulty with coalescing is that if you get too aggressive then
you end up removing degrees of freedom from the allocator and you can
easily make the final results worse.