public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robert Suchanek <Robert.Suchanek@imgtec.com>
To: Richard Sandiford <rdsandiford@googlemail.com>,
	Matthew Fortune	<Matthew.Fortune@imgtec.com>
Cc: Vladimir Makarov <vmakarov@redhat.com>,
	"gcc-patches@gcc.gnu.org"	<gcc-patches@gcc.gnu.org>,
	Kyrill Tkachov <kyrylo.tkachov@arm.com>
Subject: RE: [RFC][PATCH][MIPS] Patch to enable LRA for MIPS backend
Date: Wed, 14 May 2014 13:24:00 -0000	[thread overview]
Message-ID: <B5E67142681B53468FAF6B7C313565623D3E73AF@KLMAIL01.kl.imgtec.org> (raw)
In-Reply-To: <87vbtd1njm.fsf@talisman.default>

Hi Richard,

Are you working on the solution to fix the breakage? I'm about
to look into this and wanted to find out how far we got with this.

Regards,
Robert

> -----Original Message-----
> From: Richard Sandiford [mailto:rdsandiford@googlemail.com]
> Sent: 10 May 2014 19:44
> To: Matthew Fortune
> Cc: Vladimir Makarov; Robert Suchanek; gcc-patches@gcc.gnu.org; Kyrill
> Tkachov
> Subject: Re: [RFC][PATCH][MIPS] Patch to enable LRA for MIPS backend
> 
> Thanks for looking at this.
> 
> Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> >> > Hi all,
> >> > This caused some testsuite failures on arm:
> >> > FAIL: gcc.target/arm/vfp-ldmdbd.c scan-assembler fldmdbd
> >> > FAIL: gcc.target/arm/vfp-ldmdbs.c scan-assembler fldmdbs
> >> > FAIL: gcc.target/arm/vfp-ldmiad.c scan-assembler fldmiad
> >> > FAIL: gcc.target/arm/vfp-ldmias.c scan-assembler fldmias
> >> >
> >> >  From the vfp-ldmdbd.c test this patch changed the codegen from:
> >> >      fldmdbd    r5!, {d7}
> >> >
> >> > into
> >> >      sub    r5, r5, #8
> >> >      fldd    d7, [r5]
> >> >
> >> > Which broke the test.
> >>
> >> Sorry for the breakage.  I've reverted the patch for now and will send a
> >> fixed version when I have time.
> >
> > The problem appears to lie with the new satisfies_memory_constraint_p
> > which is passing just the address to valid_address_p but the constraint
> > is a memory constraint (which wants the mem to be retained).
> 
> Yeah.
> 
> > One option is to re-construct the MEM using the address_info provided
> > to valid_address_p. This has mode, address space and whether it was
> > actually a MEM to start with so there is enough information.
> 
> We don't want to create garbage rtl though.  The substitution happens
> in-place, so the routine does temporarily turn the original MEM into the
> eliminated form.
> 
> My first reaction after seeing the bug was to pass the operand in as
> another parameter to valid_address_p.  That made the interface a bit
> ridiculous though, so I didn't post it and reverted the original patch
> instead.
> 
> I think a cleaner way of doing it would be to have helper functions
> that switch in and out of the eliminated form, storing the old form
> in fields of a new structure (either separate from address_info,
> or a local inheritance of it).  We probably also want to have arrays
> of address_infos, one for each operand, so that we don't analyse the
> same address too many times during the same insn.
> 
> > Another issue noticed while looking at this:
> > process_address does not seem to make an attempt to check for
> > EXTRA_MEMORY_CONSTRAINT even though it does decompose memory addresses.
> > For the lea address case then the address is checked with valid_address_p.
> > This seems inconsistent, is it intentional?
> 
> Yeah, I think so.  Memory constraints are different in two main ways:
> 
> (a) it's obvious from the MEM what the mode and address space of the
>     access actually are.  legitimate_address_p is all about the most
>     general address, so in practice no memory constraint should rely
>     on accepting more than legitimate_address_p does.
> 
> (b) it's useful for one pattern to have several alternatives with
>     different memory constraints (e.g. "ZS", "ZT" and "m" in the 32-bit
>     MIPS move patterns).  There isn't really anything special about the
>     first alternative.
> 
> IMO it'd be good to get rid of this special handling for extra address
> constraints, but I've no idea how easy that would be.
> 
> Thanks,
> Richard

  reply	other threads:[~2014-05-14 13:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-29  1:27 Robert Suchanek
2014-03-29 11:24 ` Richard Sandiford
2014-04-09 10:00   ` Robert Suchanek
2014-04-09 21:24     ` Richard Sandiford
2014-04-10 20:29       ` Richard Sandiford
2014-04-14 11:13       ` Robert Suchanek
2014-04-15 21:12         ` Richard Sandiford
2014-04-16 21:10           ` Robert Suchanek
2014-04-21 13:01             ` Richard Sandiford
2014-04-23 13:34               ` Robert Suchanek
2014-04-23 14:10                 ` Richard Sandiford
2014-04-23 15:34                   ` Robert Suchanek
2014-04-23 15:33               ` Vladimir Makarov
2014-05-03 19:21                 ` Richard Sandiford
2014-05-06 14:06                   ` Kyrill Tkachov
2014-05-06 19:22                     ` Richard Sandiford
2014-05-09 22:58                       ` Matthew Fortune
2014-05-10 18:44                         ` Richard Sandiford
2014-05-14 13:24                           ` Robert Suchanek [this message]
2014-05-15 21:05                             ` Robert Suchanek
2014-05-15 21:34                             ` Richard Sandiford
2014-05-16 21:05                               ` Robert Suchanek
2014-05-18 19:38                           ` Richard Sandiford
2014-06-02 19:37                             ` RFA: Make LRA temporarily eliminate addresses before testing constraints Richard Sandiford
2014-06-03 20:50                               ` Vladimir Makarov
2014-06-04 17:45                                 ` Richard Sandiford
2014-06-11 11:30                                   ` Robert Suchanek
2014-06-16 16:12                                   ` Robert Suchanek
2014-06-16 18:08                                     ` Vladimir Makarov
2014-06-18 20:52                                       ` Matthew Fortune
2014-03-29 14:08 ` [RFC][PATCH][MIPS] Patch to enable LRA for MIPS backend Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B5E67142681B53468FAF6B7C313565623D3E73AF@KLMAIL01.kl.imgtec.org \
    --to=robert.suchanek@imgtec.com \
    --cc=Matthew.Fortune@imgtec.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kyrylo.tkachov@arm.com \
    --cc=rdsandiford@googlemail.com \
    --cc=vmakarov@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).