public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Pop <sebpop@gmail.com>
To: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Vladimir Makarov <vmakarov@redhat.com>,
	Richard Sandiford <rdsandiford@googlemail.com>
Subject: Re: [PATCH] Account for prologue spills in reg_pressure scheduling
Date: Mon, 20 Oct 2014 19:13:00 -0000	[thread overview]
Message-ID: <20141020191105.GB30024@f1.c.bardezibar.internal> (raw)
In-Reply-To: <FE7CEF4D-A27B-46D0-96B3-3569C1558DF9@linaro.org>

Maxim Kuvyrkov wrote:
> Hi,
> 
> This patch improves register pressure scheduling (both SCHED_PRESSURE_WEIGHTED and SCHED_PRESSURE_MODEL) to better estimate number of available registers.
> 
> At the moment the scheduler does not account for spills in the prologues and restores in the epilogue, which occur from use of call-used registers.  The current state is, essentially, optimized for case when there is a hot loop inside the function, and the loop executes significantly more often than the prologue/epilogue.  However, on the opposite end, we have a case when the function is just a single non-cyclic basic block, which executes just as often as prologue / epilogue, so spills in the prologue hurt performance as much as spills in the basic block itself.  In such a case the scheduler should throttle-down on the number of available registers and try to not go beyond call-clobbered registers.
> 
> The patch uses basic block frequencies to balance the cost of using call-used registers for intermediate cases between the two above extremes.
> 
> The motivation for this patch was a floating-point testcase on arm-linux-gnueabihf (ARM is one of the few targets that use register pressure scheduling by default).
> 

Does aarch64 enable reg pressure sched by default, or what is the flag to enable it?
I'm planing to look at the perf impact of the patch.

Thanks,
Sebastian

  reply	other threads:[~2014-10-20 19:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20  7:03 Maxim Kuvyrkov
2014-10-20 19:13 ` Sebastian Pop [this message]
2014-10-20 19:23   ` Maxim Kuvyrkov
2014-10-20 20:44     ` Sebastian Pop
2014-10-20 20:59       ` Maxim Kuvyrkov
2014-10-20 21:21         ` Sebastian Pop
2014-10-20 21:21         ` Richard Sandiford
2014-10-20 21:57           ` Ramana Radhakrishnan
2014-10-20 22:27             ` Maxim Kuvyrkov
2014-10-21  0:01             ` Sebastian Pop
2014-10-20 22:13         ` Evandro Menezes
2014-10-21 15:27 ` Vladimir Makarov
2014-10-22  7:45   ` Maxim Kuvyrkov
2014-10-22 12:51     ` Richard Sandiford
2014-10-22 14:47     ` Vladimir Makarov
2014-10-23  3:19       ` Maxim Kuvyrkov
2014-10-23  7:25         ` Richard Sandiford
2014-10-23  7:28           ` Maxim Kuvyrkov

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=20141020191105.GB30024@f1.c.bardezibar.internal \
    --to=sebpop@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=maxim.kuvyrkov@linaro.org \
    --cc=rdsandiford@googlemail.com \
    --cc=vmakarov@redhat.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).