public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Vladimir Makarov <vmakarov@redhat.com>, Jeff Law <law@redhat.com>,
	ramrad01@arm.com
Subject: [PATCH 4/8] Disable max_issue when scheduling for register pressure
Date: Tue, 21 Oct 2014 03:31:00 -0000	[thread overview]
Message-ID: <D371E137-568A-4772-B3D7-9A898B0E6B7C@linaro.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

Hi,

This patch disables max_issue-based lookahead multipass scheduling when register-pressure heuristics are active.  The two approaches tend to undo each others decisions and don't play well together.

Currently this patch is a no-op, since no target uses both max_issue and register-pressure scheduling.  This will change soon with upcoming patches that will enable max_issue during 2nd scheduling pass for ARM and AArch64.

Bootstrapped on x86_64-linux-gnu.  Regression testing is in progress.  OK to commit if no regressions?

[ChangeLog is part of the git patch]

Thank you,

--
Maxim Kuvyrkov
www.linaro.org



[-- Attachment #2: 0004-Disable-max_issue-when-scheduling-for-register-press.patch --]
[-- Type: application/octet-stream, Size: 1071 bytes --]

From caae8fd31b92ea63d91604df4d71a7866303ec2a Mon Sep 17 00:00:00 2001
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
Date: Tue, 21 Oct 2014 00:25:11 +0100
Subject: [PATCH 4/8] Disable max_issue when scheduling for register pressure

	* haifa-sched.c (sched_init): Disable max_issue when scheduling for
	register pressure.
---
 gcc/haifa-sched.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 4f9648c..26d9e29 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -6867,7 +6867,10 @@ sched_init (void)
   else
     issue_rate = 1;
 
-  if (targetm.sched.first_cycle_multipass_dfa_lookahead)
+  if (targetm.sched.first_cycle_multipass_dfa_lookahead
+      /* Don't use max_issue with reg_pressure scheduling.  Multipass
+	 scheduling and reg_pressure scheduling undo each other's decisions.  */
+      && sched_pressure == SCHED_PRESSURE_NONE)
     dfa_lookahead = targetm.sched.first_cycle_multipass_dfa_lookahead ();
   else
     dfa_lookahead = 0;
-- 
1.7.9.5


             reply	other threads:[~2014-10-21  3:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21  3:31 Maxim Kuvyrkov [this message]
2014-10-21 15:57 ` Vladimir Makarov

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=D371E137-568A-4772-B3D7-9A898B0E6B7C@linaro.org \
    --to=maxim.kuvyrkov@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=ramrad01@arm.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).