This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [VTA, PR debug/41353] sort MO_VAL_LOC last among uses
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Sep 2009 13:07:08 +0200
- Subject: Re: [VTA, PR debug/41353] sort MO_VAL_LOC last among uses
- References: <or63bat1tu.fsf@huru.localdomain>
On Wed, Sep 23, 2009 at 12:03 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
> When a REG is first referenced within a basic block in a DEBUG_INSN,
> odds are that its MO_VAL_USE will end up clobbering the binding
> established by the MO_VAL_LOC emitted before it.
>
> This (so far untested) patch ensures MO_VAL_LOCs are moved last among
> the uses generated for an insn, just like MO_USEs are moved first. ?I'm
> posting it right away upon Jakub's request.
>
> It would be possible to implement this sorting in a single pass over the
> MOs. ?I doubt it's worth the complexity, though. ?Iterating twice in
> trivial loops over the few MOs generated for an insn should be faster
> than a single complicated loop. ?And with vta-temp-values-pr41343.patch,
> there are going to be much fewer MOs per insns.
>
> Ok to install if it regstraps successfully?
Ok.
Thanks,
Richard.