public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Make LR/CTR moves expensive for Power7 also
@ 2011-04-11 20:04 Pat Haugen
  2011-04-11 20:58 ` David Edelsohn
  0 siblings, 1 reply; 2+ messages in thread
From: Pat Haugen @ 2011-04-11 20:04 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Edelsohn

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];

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, rs6000] Make LR/CTR moves expensive for Power7 also
  2011-04-11 20:04 [PATCH, rs6000] Make LR/CTR moves expensive for Power7 also Pat Haugen
@ 2011-04-11 20:58 ` David Edelsohn
  0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2011-04-11 20:58 UTC (permalink / raw)
  To: Pat Haugen; +Cc: gcc-patches

On Mon, Apr 11, 2011 at 4:03 PM, Pat Haugen <pthaugen@linux.vnet.ibm.com> wrote:
> 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.

Okay.

Thanks, David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-11 20:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 20:04 [PATCH, rs6000] Make LR/CTR moves expensive for Power7 also Pat Haugen
2011-04-11 20:58 ` David Edelsohn

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).