public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [lra] one more patch to decrease ARM code size degradation
@ 2011-08-02 19:49 Vladimir Makarov
  0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2011-08-02 19:49 UTC (permalink / raw)
  To: gcc-patches

The following patch decreases ARM code size degradation for LRA.  It 
permits achieve practically the same SPECINT2000 code size on ARM as for 
reload (there is still small ARM code size degradation on SPECFP2000).

The patch was successfully bootstrapped on x86-64.

2011-08-02  Vladimir Makarov <vmakarov@redhat.com>

         * lra-assigns.c (find_hard_regno_for): Don't do hard register
         usage leveling for targets with conditional execution.

Index: lra-assigns.c
===================================================================
--- lra-assigns.c       (revision 176950)
+++ lra-assigns.c       (working copy)
@@ -428,7 +428,12 @@ find_hard_regno_for (int regno, int *cos
           if (best_hard_regno < 0 || hard_regno_costs[hard_regno] < 
best_cost
               || (hard_regno_costs[hard_regno] == best_cost
&& (bank < best_bank
-                     || (bank == best_bank
+                     /* 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 ()
+ && bank == best_bank
&& best_usage > lra_hard_reg_usage[hard_regno]))))
             {
               best_hard_regno = hard_regno;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-02 19:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-02 19:49 [lra] one more patch to decrease ARM code size degradation Vladimir Makarov

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