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]

Re: [RFC PATCH, i386]: Prefer %ebx in set_got patterns


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  <ubizjak@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


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