From: Pat Haugen <pthaugen@linux.vnet.ibm.com>
To: gcc-patches@gcc.gnu.org
Cc: David Edelsohn <dje.gcc@gmail.com>
Subject: [PATCH, rs6000] Make LR/CTR moves expensive for Power7 also
Date: Mon, 11 Apr 2011 20:04:00 -0000 [thread overview]
Message-ID: <4DA35EA3.5090606@linux.vnet.ibm.com> (raw)
The following was overlooked on initial Power7 support.
Bootstrap/regtest on powerpc64-linux with no new regressions. Ok for trunk and 4.6?
-Pat
2011-04-11 Pat Haugen <pthaugen@us.ibm.com>
* config/rs6000/rs6000.c (rs6000_register_move_cost): Make LR/CTR
moves expensive on Power7 also.
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 172255)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -26701,9 +26701,10 @@ rs6000_register_move_cost (enum machine_
else if (from == CR_REGS)
ret = 4;
- /* Power6 has slower LR/CTR moves so make them more expensive than
- memory in order to bias spills to memory .*/
- else if (rs6000_cpu == PROCESSOR_POWER6
+ /* For those processors that have slow LR/CTR moves, make them more
+ expensive than memory in order to bias spills to memory .*/
+ else if ((rs6000_cpu == PROCESSOR_POWER6
+ || rs6000_cpu == PROCESSOR_POWER7)
&& reg_classes_intersect_p (from, LINK_OR_CTR_REGS))
ret = 6 * hard_regno_nregs[0][mode];
next reply other threads:[~2011-04-11 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 20:04 Pat Haugen [this message]
2011-04-11 20:58 ` David Edelsohn
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=4DA35EA3.5090606@linux.vnet.ibm.com \
--to=pthaugen@linux.vnet.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@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).