On 11/27/14 04:19, Uros Bizjak wrote:
Hello!
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.
Can you file a bug for that issue so that Vlad can track it.
jeff