patch to fix PR 60650

Vladimir Makarov vmakarov@redhat.com
Thu Mar 27 20:05:00 GMT 2014


  The following patch fixes

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

  The reason was in general regs pool fragmentation which resulted in
failure to assign double regs to 3 conflicting reload pseudos.  The
fragmentation started in IRA and the chain unfortunate events further in
LRA resulted in LRA crash.

  The patch fixes this problem by more radical than previous approach. 
In case we can not assign a hard reg on the 1st pass (which is very rare
event as we can spill *non-reload* pseudos), we spill all conflicting
pseudos and assign always 1st available hard reg which permits to avoid
the fragmentation.

  The patch was successfully bootstrapped and tested on x86-64 and arm.

  Committed as rev.208876.

2014-03-27  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/60650
        * lra-assign.c (find_hard_regno_for, spill_for): Add parameter
        first_p.  Use it.
        (find_spills_for): New.
        (assign_by_spills): Pass the new parameter to find_hard_regno_for.
        Spill all pseudos on the second iteration.

2014-03-27  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/60650
        * gcc.target/arm/pr60650.c: New.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr60650.patch
Type: text/x-patch
Size: 11235 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140327/a3551a11/attachment.bin>


More information about the Gcc-patches mailing list