This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch to fix PR55342


The following patch solves

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55342

LRA after spilling a pseudo tries to assign freed hard regno to other reload pseudos and chooses the best. The more reload pseudos got the freed hard regno, the less cost of spilling. But the reload pseudos could get another hard regno without spilling. So LRA code before the patch incorrectly evaluated the cost of spilling. The patch tries to allocate a hard reg to the other reload pseudos before and after spilling in order to correctly evaluate spilling cost.

The patch was successfully bootstrapped on x86/x86-64.

Committed as rev. 193588.

2012-11-17 Vladimir Makarov <vmakarov@redhat.com>

        PR rtl-optimization/55342
        * lra-assigns.c (spill_for): Try to allocate other reload pseudos
        before and after spilling.


Attachment: pr55342.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]