Message ID | 4D63CB17.9010903@gjlay.de |
---|---|
State | New |
Headers | show |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/22/11 07:41, Georg-Johann Lay wrote: > This patchlet was proposed by Paolo Bonzini in > > http://gcc.gnu.org/ml/gcc/2010-10/msg00427.html > > Hard regs for which LOCAL_REGNO is true do not cause costs in > prologue/epilogue because they need not to be saved/restored. > > 2011-02-11 Georg-Johann Lay <avr@gjlay.de> > > * ira-color.c (assign_hard_reg): Honor LOCAL_REGNO in cost > computation for prologue/epilogue. Vlad approved this patch here: http://gcc.gnu.org/ml/gcc/2011-03/msg00108.html I went ahead and installed it after a bootstrap & regression test run. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNg5C/AAoJEBRtltQi2kC71I8IAKxoWbyIF3HPGs0iqe19HXDm jXO14Hl/olPFNt1UiXAxSL6nYiZJ/Th3Pfg4RcVhNDfGqVBJn9uxpnEKCZ0IWGO/ gyi6KL9dUMVntOGosVYZUpYF0W1A1zoZAmZ3ZPIPYpTjzP6C/g0/ztoaEO3zCXXW /KN/6gaxBH6H+H1aoBEck3tOc92SgOde9EMIPJEoeblpavXU+EAisiFwcOow21Ww ItwgxGQHAYnSEaaeF4ixpktPowKpZ6hAPAQaetvMJfmxs5Z1n6P9uAW9Mgx4Jkmw UnMkIaOoKGhU064T703DmtR8TBYsGk5kLnzGd58NybkS+5tbvNWDwXfuFpMKG8U= =hVL7 -----END PGP SIGNATURE-----
Index: ira-color.c =================================================================== --- ira-color.c (revision 170401) +++ ira-color.c (working copy) @@ -591,7 +591,8 @@ assign_hard_reg (ira_allocno_t a, bool r full_cost = full_costs[i]; #ifndef HONOR_REG_ALLOC_ORDER if (! allocated_hardreg_p[hard_regno] - && ira_hard_reg_not_in_set_p (hard_regno, mode, call_used_reg_set)) + && ira_hard_reg_not_in_set_p (hard_regno, mode, call_used_reg_set) + && !LOCAL_REGNO(hard_regno)) /* We need to save/restore the hard register in epilogue/prologue. Therefore we increase the cost. */ {