From: Jeff Law <law@redhat.com>
To: Bernd Schmidt <bernds@codesourcery.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Emit more REG_EQUIV notes for function args (PR42235)
Date: Wed, 14 Jul 2010 22:22:00 -0000 [thread overview]
Message-ID: <4C3E387E.2080202@redhat.com> (raw)
In-Reply-To: <4C3E3078.7020706@codesourcery.com>
On 07/14/10 15:47, Bernd Schmidt wrote:
> On 07/14/2010 08:54 PM, Jeff Law wrote:
>
>> In theory, given the REG_EQUIV note we ought to get an entry in
>> reg_equiv_mem, which the code I'm working on knows it can use instead of
>> shoving the pseudo into a stack slot. Effectively, my code will
>> rematerialize the argument from the equivalent memory location
>> regardless of the number of uses.
>>
> Reload can do that already, I think, but it's not prepared to handle a
> (zero_extend (mem)) inside a REG_EQUIV note. That should be reasonably
> trivial to add if the reg is never set other than in the initializing insn.
>
reload does, but it's code that can be problematical. For example,
replacement of an unallocated pseudo with its equivalent can trigger
secondary reloads, spills, etc.
My code creates a new pseudo/allocno for the various ranges where the
unallocated pseudo is live then asks IRA to color those split-range
pseudos/allocnos. What we end up presenting to reload is cleaner;
though often they result in the same final code. Handling this case
falls out nicely from the infrastructure for splitting ranges of
unallocated pseudos without equivalent forms (it's probably a couple
dozen lines of new code).
jeff
prev parent reply other threads:[~2010-07-14 22:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 11:14 Bernd Schmidt
2010-07-14 18:54 ` Jeff Law
2010-07-14 21:30 ` Bernd Schmidt
2010-07-14 22:28 ` Jeff Law
2010-07-15 17:14 ` Bernd Schmidt
2010-07-15 21:26 ` Jeff Law
2010-07-19 9:55 ` Bernd Schmidt
2010-07-19 16:51 ` Jeff Law
2010-07-19 16:53 ` Bernd Schmidt
2010-07-19 16:59 ` Richard Henderson
2010-07-19 17:09 ` Jeff Law
2010-07-19 19:06 ` John David Anglin
2010-07-21 22:53 ` Bernd Schmidt
2010-07-14 21:48 ` Bernd Schmidt
2010-07-14 22:22 ` Jeff Law [this message]
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=4C3E387E.2080202@redhat.com \
--to=law@redhat.com \
--cc=bernds@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).