public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Thomas Preud'homme" <thomas.preudhomme@arm.com>
To: "'Steven Bosscher'" <stevenb.gcc@gmail.com>
Cc: "GCC Patches" <gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH, GCC, stage1] Fallback to copy-prop if constant-prop not possible
Date: Mon, 23 Mar 2015 11:01:00 -0000	[thread overview]
Message-ID: <000201d06558$acd8a130$0689e390$@arm.com> (raw)
In-Reply-To: <CABu31nMq-md5ZRAovEzcOM8tPYH8GJZn-pb6tQTPJcHA=F=zjg@mail.gmail.com>

> From: Steven Bosscher [mailto:stevenb.gcc@gmail.com]
> Sent: Friday, March 20, 2015 8:14 PM
> 
> I put the cprop_reg_p check there instead of !HARD_REGISTER_P
> because
> I like to be able to quickly find all places where a similar check is
> performed. The check is whether the reg is something that copy
> propagation can handle, and that is what I added cprop_reg_p for.

Makes sense indeed. I didn't think about the meaning of it.

> (Note that cprop can _currently_ handle only pseudos but there is no
> reason why a limited set of hard regs can't be handled also, e.g. the
> flag registers like in targetm.fixed_condition_code_regs).
> 
> In this case, the result is that REG_P is checked twice.
> But then again, cprop_reg_p will be inlined and the double check
> optimized away.

True.

> 
> Anyway, I guess we've bikeshedded long enough over this patch as it is
> :-) Let's post a final form and declare it OK for stage1.

What about the cprop_reg_p that needs to be negated? Did I miss something
that makes it ok?

> 
> As for PSEUDO_REG_P: If it were up to me, I'd like to have in rtl.h:
> 
> static bool
> hard_register_p (rtx x)
> {
>   return (REG_P (x) && HARD_REGISTER_NUM_P (REGNO (x)));
> }
> 
> static bool
> pseudo_register_p (rtx x)
> {
>   return (REG_P (x) && !HARD_REGISTER_NUM_P (REGNO (x)));
> }
> 
> and do away with all the FIRST_PSEUDO_REGISTER tests. But I've
> proposed this in the past and there was opposition. Perhaps when we
> introduce a rtx_reg class...

Ok I'll try to dig up what was the reasons presented. Anyway, it would
be done in a separate patch so not a problem for this one.

FYI testing your patch with the one cprop_reg_p negated as said in my
previous email shows no regression on arm-none-eabi cross-compiler
targeting Cortex-M3. Testing for x86_64 is ongoing.

Best regards,

Thomas




  reply	other threads:[~2015-03-23 11:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 10:26 Thomas Preud'homme
2015-02-16 10:54 ` Richard Biener
2015-02-16 12:06 ` Steven Bosscher
2015-02-16 20:20 ` Steven Bosscher
2015-02-17  2:51   ` Thomas Preud'homme
2015-03-04  8:52     ` Thomas Preud'homme
2015-03-20  7:55     ` Steven Bosscher
2015-03-20  8:36       ` Thomas Preud'homme
2015-03-20 10:27         ` Thomas Preud'homme
2015-03-20 12:14           ` Steven Bosscher
2015-03-23 11:01             ` Thomas Preud'homme [this message]
2015-03-23 11:57               ` Steven Bosscher
2015-03-30  4:58               ` Thomas Preud'homme
2015-04-13 12:47 ` Jeff Law
2015-04-14  8:00   ` Thomas Preud'homme
2015-04-16  8:44   ` Thomas Preud'homme
2015-04-23  9:15     ` Steven Bosscher
2015-04-24  2:59     ` Jeff Law
2015-04-24  3:11       ` Thomas Preud'homme
2015-04-24  3:15         ` Jeff Law
2015-04-24  4:53           ` Thomas Preud'homme
2015-04-30  7:43             ` Bin.Cheng

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='000201d06558$acd8a130$0689e390$@arm.com' \
    --to=thomas.preudhomme@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=stevenb.gcc@gmail.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).