diff options
author | Pat Haugen <pthaugen@us.ibm.com> | 2011-05-26 15:09:31 +0000 |
---|---|---|
committer | Pat Haugen <pthaugen@gcc.gnu.org> | 2011-05-26 15:09:31 +0000 |
commit | c61e40d377de73443f80d44900c024459b3631e1 (patch) | |
tree | ed809276f5736314802585e6f75ad48d7c4ca416 /gcc | |
parent | 1f498652b20a31721e404371e6a0cfa339752bce (diff) | |
download | gcc-c61e40d377de73443f80d44900c024459b3631e1.zip gcc-c61e40d377de73443f80d44900c024459b3631e1.tar.gz gcc-c61e40d377de73443f80d44900c024459b3631e1.tar.bz2 |
rs6000.c (rs6000_register_move_cost): Make LR/CTR moves expensive on Power7 also.
* config/rs6000/rs6000.c (rs6000_register_move_cost): Make LR/CTR
moves expensive on Power7 also.
From-SVN: r174292
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b8478e..e72b144 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-26 Pat Haugen <pthaugen@us.ibm.com> + + * config/rs6000/rs6000.c (rs6000_register_move_cost): Make LR/CTR + moves expensive on Power7 also. + 2011-05-26 Richard Guenther <rguenther@suse.de> * fold-const.c (fold_unary_loc): Remove bogus code. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 48f387e..d6a12fd 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -26444,9 +26444,10 @@ rs6000_register_move_cost (enum machine_mode mode, 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]; |