public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vladimir Makarov <vmakarov@redhat.com>
To: gcc@gcc.gnu.org
Subject: Re: count in spill_regs
Date: Mon, 02 Apr 2018 16:36:00 -0000	[thread overview]
Message-ID: <5a318720-9e79-73ca-006e-82e8210bcfb8@redhat.com> (raw)
In-Reply-To: <CAEf=hC8khLnCzUOtTa2kwXzjXOF4CJKYMbfdXyv2yvOV2iSy8A@mail.gmail.com>



On 03/28/2018 05:31 PM, Sirish Pande wrote:
> Hi,
>
> I am interested to know if there is any option that would tell me how many
> registers have spilled. I noticed that there is spilled_regs array in
> reload1.c - but I can't seem to find where it dumps that information.
> Potentially I could build compiler with debug information; however, if an
> option exists, that would be great.
> If anyone knows of such an option, please share.
>
   There is no such option and there would be no sense for such option.  
GCC RA does a lot of things including pseudo-register live range 
splitting and rematerialization.  The RA might create a lot of new 
pseudos during its work.

   You can find some allocation metrics in .ira dump file (as the 
overall allocation cost, cost of using pseudos which were allocated to 
hard registers and memory, costs of loads, stores and moves generated 
during global RA).  The calculation is based on CFG BB and edge 
frequency estimation.  The calculation will be more accurate when you 
use profiling.

   But the allocation can be changed after IRA (global RA) in LRA (local 
RA) which might also create additional insns and pseudos. Btw reload 
pass is not used for major targets anymore.  It is an old pass which is 
being substituted by LRA.

      reply	other threads:[~2018-04-02 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 21:31 Sirish Pande
2018-04-02 16:36 ` Vladimir Makarov [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=5a318720-9e79-73ca-006e-82e8210bcfb8@redhat.com \
    --to=vmakarov@redhat.com \
    --cc=gcc@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).