This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Expand PIC calls without PLT with -fno-plt
- From: Jeff Law <law at redhat dot com>
- To: ramrad01 at arm dot com, Alexander Monakov <amonakov at ispras dot ru>
- Cc: Jiong Wang <jiong dot wang at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Rich Felker <dalias at libc dot org>, Dmitry Melnik <dm at ispras dot ru>, Eugene Kudryashov <ka6ash at gmail dot com>
- Date: Tue, 23 Jun 2015 07:26:15 -0600
- Subject: Re: [PATCH] Expand PIC calls without PLT with -fno-plt
- Authentication-results: sourceware.org; auth=none
- References: <1430757479-14241-1-git-send-email-amonakov at ispras dot ru> <1430757479-14241-6-git-send-email-amonakov at ispras dot ru> <55882EEB dot 7060207 at arm dot com> <alpine dot LNX dot 2 dot 11 dot 1506221927270 dot 5505 at monopod dot intra dot ispras dot ru> <CAJA7tRZ8zcTz_WjghszxVe7ZPCTA1G0xMP5oakM4iGGik=PJzg at mail dot gmail dot com>
On 06/23/2015 02:29 AM, Ramana Radhakrishnan wrote:
If you try disabling the REG_EQUAL note generation [*], you'll probably find a
performance regression on arm32 (and probably on aarch64 as well?
we only
IMHO disabling the REG_EQUAL note generation is the wrong way to go about this.
Agreed.
Irrespective of combine, as a first step we should fix the predicates
and the call expanders to prevent this sort of replacement in the
backends. Tightening the predicates in the call patterns will achieve
the same for you and then we can investigate the use of GOT_PREL. My
recollection of this is that you need to work out when it's more
beneficial to use GOT_PREL over GOT but it's been a while since I
looked in that area.
Also agreed. This is primarily a backend issue with the call patterns.
This is similar to the situation on the PA with the 32bit SOM runtime
where direct and indirect calls have different calling conventions.
Those different calling conventions combined with the early loading of
the parameter registers in effect restricts us from being able to
transform an indirect call into a direct call (combine) or vice-versa (cse).
The way we handled this was to split the calls into two patterns, one
for direct one for indirect and tightening their predicates appropriately.
Jeff