From: "H.J. Lu" <hjl.tools@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>,
gcc-patches@gcc.gnu.org, ebotcazou@libertysurf.fr,
rdsandiford@googlemail.com
Subject: Re: PATCH [6/n]: Prepare x32: PR rtl-optimization/47449: Don't propagate hard register non-local goto save area
Date: Mon, 04 Jul 2011 20:52:00 -0000 [thread overview]
Message-ID: <CAMe9rOo03KaSxDNjoxRA7nbAE7ERCbzRpB_m=rWGUcq7d7v_BQ@mail.gmail.com> (raw)
In-Reply-To: <87k4bx4y4s.fsf@firetop.home>
On Mon, Jul 4, 2011 at 12:57 PM, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> "H.J. Lu" <hongjiu.lu@intel.com> writes:
>> RTL-based forward propagation pass shouldn't propagate hard register.
>
> That's seems a bit draconian. Many fixed hard registers ought to be OK.
> E.g. there doesn't seem to be anything wrong with propagating uses of
> the stack or frame pointers, subject to the usual availability checks.
>
> To play devil's advocate, an alternative might be to
>
> (a) make local_ref_killed_between_p return true for non-fixed hard
> registers when a call or asm comes between the two instructions
>
> (b) make use_killed_between return true for non-fixed hard registers
> when the instructions are in different basic blocks
>
> Thoughts?
>
There are a few problems with this suggestions:
1. The comments says:
/* If USE is a subreg, see if it can be replaced by a pseudo. */
static bool
forward_propagate_subreg (df_ref use, rtx def_insn, rtx def_set)
{
It indicates this function is intended to work on pseudo registers.
2. propagate_rtx avoids hard registers:
static rtx
propagate_rtx (rtx x, enum machine_mode mode, rtx old_rtx, rtx new_rtx,
bool speed)
{
rtx tem;
bool collapsed;
int flags;
if (REG_P (new_rtx) && REGNO (new_rtx) < FIRST_PSEUDO_REGISTER)
return NULL_RTX;
It seems that fwprop is intended to deal with pseudo registers. If we
want to extend it to hard registers, that should be a separate project.
Thanks.
--
H.J.
next prev parent reply other threads:[~2011-07-04 20:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 5:21 H.J. Lu
2011-07-04 19:57 ` Richard Sandiford
2011-07-04 20:52 ` H.J. Lu [this message]
2011-07-04 20:58 ` H.J. Lu
2011-07-04 23:54 ` Alan Modra
2011-07-05 0:09 ` H.J. Lu
2011-07-05 1:35 ` Alan Modra
2011-07-05 7:09 ` Paolo Bonzini
2011-07-05 8:02 ` Paolo Bonzini
2011-07-05 8:52 ` Richard Sandiford
2011-07-05 8:55 ` Paolo Bonzini
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='CAMe9rOo03KaSxDNjoxRA7nbAE7ERCbzRpB_m=rWGUcq7d7v_BQ@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=ebotcazou@libertysurf.fr \
--cc=gcc-patches@gcc.gnu.org \
--cc=rdsandiford@googlemail.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).