On Mon, Dec 1, 2014 at 6:47 PM, Jeff Law <l...@redhat.com> wrote: > On 11/27/14 04:19, Uros Bizjak wrote:
>> Attached patch helps RA to choose the most appropriate PIC register by >> changing the register preference for set_got patterns. Using this >> patch, there should really be a reason for RA to avoid ABI mandated >> hard PIC reg. > > Agreed. > >> >> This patch avoids many mov %exx,%ebx in front of the calls, that >> happen with unpatched compiler even with Vladimir's latest RA patch to >> avoid duplicated PIC registers. > > [ ... ] > Far more than I would have expected. > > >> 2014-11-27 Uros Bizjak <ubiz...@gmail.com> >> >> * config/i386/i386.md (set_got): Use "=b,?r" constraint for operand >> 0. >> (set_got_labelled): Ditto. >> (set_got_rex64): Ditto. >> (set_rip_rex64): Ditto. >> (set_got_offset_rex64): Ditto. >> >> Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. >> >> Thoughts? > > As HJ mentioned, it's not perfect, but it's certainly better than what we're > doing now. > > The only thing I don't like is that it's really disguising failings in > IRA/LRA. Yes, this is the reason I have second thoughts about the patch. I think that it papers over real issue in RA. > Can you file a bug for that issue so that Vlad can track it. Actually, I noticed it in libgo, where searching for various non-bx thunks reveals many cases. I don't have a small testcase at hand ATM. Uros.