public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: Sebastian Pop <sebpop@gmail.com>
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:23:00 -0000	[thread overview]
Message-ID: <ED2138EC-B4EA-4BBA-AC29-5B5A3B628A9F@linaro.org> (raw)
In-Reply-To: <20141020191105.GB30024@f1.c.bardezibar.internal>

On Oct 21, 2014, at 8:11 AM, Sebastian Pop <sebpop@gmail.com> wrote:

> 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, benchmarking results are welcome!  AArch64 doesn't use reg_pressure scheduling by default.  Use "-fsched-pressure --param=sched-pressure-algorithm=2" to enable same thing as on ARM.  I would imagine C++ and Fortran floating-point code to be most affected.

--
Maxim Kuvyrkov
www.linaro.org

  reply	other threads:[~2014-10-20 19:16 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
2014-10-20 19:23   ` Maxim Kuvyrkov [this message]
2014-10-20 20:44     ` Sebastian Pop
2014-10-20 20:59       ` Maxim Kuvyrkov
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 21:21         ` 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=ED2138EC-B4EA-4BBA-AC29-5B5A3B628A9F@linaro.org \
    --to=maxim.kuvyrkov@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rdsandiford@googlemail.com \
    --cc=sebpop@gmail.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).