public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Chung-Lin Tang <cltang@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, ARM] PR48250, rehaul arm_legitimize_reload_address()
Date: Mon, 11 Apr 2011 10:54:00 -0000	[thread overview]
Message-ID: <1302519237.21707.36.camel@e102346-lin.cambridge.arm.com> (raw)
In-Reply-To: <4D9EBEC8.2020807@codesourcery.com>


On Fri, 2011-04-08 at 15:52 +0800, Chung-Lin Tang wrote:
> Hi Richard,
> here's a new patch, with some quite significant changes to
> arm_legitimize_reload_address(). This time fully utilizing the
> sign-magnitude offset macro you gave in the last thread, and adapting
> your description into embedded comments.
> 
> The reload_outdf pattern caused some regressions in a first round of
> testing. With the new reload address legitimization, which creates a RTX
> like (mem (plus (plus reg #high) #low)), the current
> SECONDARY_RELOAD_OUTPUT_CLASS macro returns 'GENERAL_REGS' under VFP,
> which triggers the execution of reload_outdf, but now creating
> unexpected (set (reg1) (plus (plus reg #high) #low)) insns.
> 
> The historical reasons for the reload_outdf pattern are not entirely
> clear, as we discussed off list. In any case, we should aim to update
> the ARM secondary reload stuff to use the newer framework. I have
> disabled the pattern under ARM mode, and cross-tested the entire patch
> under v7-A/v5TE VFP, v7-A NEON, and v4T soft-float configs, all clear of
> regressions.
> 
> reload_outdf is disabled by changing the pattern condition from
> TARGET_32BIT to TARGET_THUMB2 (disabling TARGET_ARM only). This is
> temporary, Thumb-2 probably needs a few more bits of simultaneous
> updates to work, so I'm leaving that for a later patch.
> 
> I've listed your name together as significant parts are from you. Is it
> ready for trunk?
> 
> Thanks,
> Chung-Lin
> 
> 2011-04-08  Chung-Lin Tang  <cltang@codesourcery.com>
> 	    Richard Earnshaw  <rearnsha@arm.com>
> 
> 	PR target/48250
> 	* config/arm/arm.c (arm_legitimize_reload_address): Update cases
> 	to use sign-magnitude offsets. Reject unsupported unaligned
> 	cases. Add detailed description in comments.
> 	* config/arm/arm.md (reload_outdf): Disable for ARM mode; change
> 	condition from TARGET_32BIT to TARGET_ARM.

This is OK, thanks for working on it.

Nothing to do with this patch specifically, but I'll note here for
completeness that LEGITIMIZE_RELOAD_ADDRESS is missing some fundamental
information which makes generating optimal code here impossible: there's
no information available about what the address is going to be used for.
Given that the set of legitimate addresses depends on this is, IMO, a
fundamental problem.

R.


  reply	other threads:[~2011-04-11 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  7:53 Chung-Lin Tang
2011-04-11 10:54 ` Richard Earnshaw [this message]
2011-04-20 14:00 ` Richard Sandiford
2011-04-20 15:19   ` Chung-Lin Tang
2011-04-20 15:23     ` Richard Earnshaw
2011-04-20 15:37       ` Chung-Lin Tang

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=1302519237.21707.36.camel@e102346-lin.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=cltang@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).