From: Segher Boessenkool <segher@kernel.crashing.org>
To: James Greenhalgh <james.greenhalgh@arm.com>
Cc: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>,
Andrew Pinski <pinskia@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Marcus Shawcroft <marcus.shawcroft@arm.com>,
Richard Earnshaw <Richard.Earnshaw@arm.com>,
nd@arm.com
Subject: Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation
Date: Tue, 29 Nov 2016 20:29:00 -0000 [thread overview]
Message-ID: <20161129202912.GA12889@gate.crashing.org> (raw)
In-Reply-To: <20161129105732.GA35224@arm.com>
Hi James, Kyrill,
On Tue, Nov 29, 2016 at 10:57:33AM +0000, James Greenhalgh wrote:
> > +static sbitmap
> > +aarch64_components_for_bb (basic_block bb)
> > +{
> > + bitmap in = DF_LIVE_IN (bb);
> > + bitmap gen = &DF_LIVE_BB_INFO (bb)->gen;
> > + bitmap kill = &DF_LIVE_BB_INFO (bb)->kill;
> > +
> > + sbitmap components = sbitmap_alloc (V31_REGNUM + 1);
> > + bitmap_clear (components);
> > +
> > + /* GPRs are used in a bb if they are in the IN, GEN, or KILL sets. */
> > + for (unsigned regno = R0_REGNUM; regno <= V31_REGNUM; regno++)
>
> The use of R0_REGNUM and V31_REGNUM scare me a little bit, as we're hardcoding
> where the end of the register file is (does this, for example, fall apart
> with the SVE work that was recently posted). Something like a
> LAST_HARDREG_NUM might work?
Components and registers aren't the same thing (you can have components
for things that aren't just a register save, e.g. the frame setup, stack
alignment, save of some non-GPR via a GPR, PIC register setup, etc.)
The loop here should really only cover the non-volatile registers, and
there should be some translation from register number to component number
(it of course is convenient to have a 1-1 translation for the GPRs and
floating point registers). For rs6000 many things in the backend already
use non-symbolic numbers for the FPRs and GPRs, so that is easier there.
> > +static void
> > +aarch64_disqualify_components (sbitmap, edge, sbitmap, bool)
> > +{
> > +}
>
> Is there no default "do nothing" hook for this?
I can make the shrink-wrap code do nothing here if this hook isn't
defined, if you want?
Segher
next prev parent reply other threads:[~2016-11-29 20:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-10 14:26 Kyrill Tkachov
2016-11-10 16:33 ` Segher Boessenkool
2016-11-10 16:45 ` Kyrill Tkachov
2016-11-10 22:42 ` Andrew Pinski
2016-11-10 23:39 ` Segher Boessenkool
2016-11-11 10:18 ` Kyrill Tkachov
2016-11-11 15:31 ` Kyrill Tkachov
2016-11-14 14:25 ` Kyrill Tkachov
2016-11-17 14:22 ` Kyrill Tkachov
2016-11-17 14:44 ` Segher Boessenkool
2016-11-17 14:55 ` Kyrill Tkachov
2016-11-17 15:02 ` Segher Boessenkool
2016-11-17 15:06 ` Kyrill Tkachov
2016-11-17 16:50 ` Kyrill Tkachov
2016-11-17 17:46 ` Segher Boessenkool
2016-11-18 9:29 ` Kyrill Tkachov
2016-11-18 12:50 ` Segher Boessenkool
2016-11-22 16:47 ` Kyrill Tkachov
2016-11-29 10:58 ` James Greenhalgh
2016-11-29 11:18 ` Kyrill Tkachov
2016-11-29 11:32 ` Kyrill Tkachov
2016-11-29 11:37 ` James Greenhalgh
2016-11-29 20:29 ` Segher Boessenkool [this message]
2016-11-30 14:08 ` Kyrill Tkachov
2016-12-02 17:09 ` James Greenhalgh
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=20161129202912.GA12889@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=Richard.Earnshaw@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=james.greenhalgh@arm.com \
--cc=kyrylo.tkachov@foss.arm.com \
--cc=marcus.shawcroft@arm.com \
--cc=nd@arm.com \
--cc=pinskia@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).