aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-assigns.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2013-05-10 15:26:31 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2013-05-10 15:26:31 +0000
commit1f873f0e2c79f45400f051e794ee6a67cf128a9d (patch)
tree0319f366e678b201129e2e8f1ab7abd9afdf66c5 /gcc/lra-assigns.c
parent94938aec1ab1996c4554fd3703708052144a784b (diff)
downloadgcc-1f873f0e2c79f45400f051e794ee6a67cf128a9d.zip
gcc-1f873f0e2c79f45400f051e794ee6a67cf128a9d.tar.gz
gcc-1f873f0e2c79f45400f051e794ee6a67cf128a9d.tar.bz2
lra-assigns.c (find_hard_regno_for): Add 1 to the cost of call saved registers.
2013-05-10 Vladimir Makarov <vmakarov@redhat.com> * lra-assigns.c (find_hard_regno_for): Add 1 to the cost of call saved registers. From-SVN: r198792
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r--gcc/lra-assigns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c
index 3f8a899..78bc2e7 100644
--- a/gcc/lra-assigns.c
+++ b/gcc/lra-assigns.c
@@ -598,7 +598,7 @@ find_hard_regno_for (int regno, int *cost, int try_only_hard_regno)
&& ! df_regs_ever_live_p (hard_regno + j))
/* It needs save restore. */
hard_regno_costs[hard_regno]
- += 2 * ENTRY_BLOCK_PTR->next_bb->frequency;
+ += 2 * ENTRY_BLOCK_PTR->next_bb->frequency + 1;
priority = targetm.register_priority (hard_regno);
if (best_hard_regno < 0 || hard_regno_costs[hard_regno] < best_cost
|| (hard_regno_costs[hard_regno] == best_cost