aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-assigns.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2013-05-30 20:30:38 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2013-05-30 20:30:38 +0000
commit3b9ceb4b4fd657faf031cc5fc47acc4ecae0ad88 (patch)
tree16088611f26652c55d7f6a9b476049876bd2cdc8 /gcc/lra-assigns.c
parentcc059bdd149ced1b66f912c54c8f435379abb4ad (diff)
downloadgcc-3b9ceb4b4fd657faf031cc5fc47acc4ecae0ad88.zip
gcc-3b9ceb4b4fd657faf031cc5fc47acc4ecae0ad88.tar.gz
gcc-3b9ceb4b4fd657faf031cc5fc47acc4ecae0ad88.tar.bz2
target.def (register_usage_leveling_p): New hook.
2013-05-30 Vladimir Makarov <vmakarov@redhat.com> * target.def (register_usage_leveling_p): New hook. * targhooks.c (default_register_usage_leveling_p): New. * targhooks.h (default_register_usage_leveling_p): New prototype. * lra-assigns.c (register_usage_leveling_p): Use the hook. * doc/tm.texi.in (TARGET_REGISTER_USAGE_LEVELING_P): New hook. * doc/tm.texi: Update. * config/i386/i386.c (TARGET_REGISTER_USAGE_LEVELING_P): Define. From-SVN: r199459
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r--gcc/lra-assigns.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c
index 78bc2e7..9719f0d 100644
--- a/gcc/lra-assigns.c
+++ b/gcc/lra-assigns.c
@@ -603,11 +603,7 @@ find_hard_regno_for (int regno, int *cost, int try_only_hard_regno)
if (best_hard_regno < 0 || hard_regno_costs[hard_regno] < best_cost
|| (hard_regno_costs[hard_regno] == best_cost
&& (priority > best_priority
- /* Hard register usage leveling actually results
- in bigger code for targets with conditional
- execution like ARM because it reduces chance
- of if-conversion after LRA. */
- || (! targetm.have_conditional_execution ()
+ || (targetm.register_usage_leveling_p ()
&& priority == best_priority
&& best_usage > lra_hard_reg_usage[hard_regno]))))
{