This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Oct 2015 14:34:23 +0000
- Subject: Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOrNKmQpsfXuvNOyevnpJq_muNmJCdvOYYKy6weEeFFi=Q at mail dot gmail dot com> <562F5E11 dot 1090503 at redhat dot com> <CAMe9rOqVM9Qhq1qPjo0qAVQFCWw-c+Ne2CtkpX_TcW5fcVbBuA at mail dot gmail dot com> <562F739F dot 2090000 at foss dot arm dot com> <CAMe9rOrL89kK=qxPS7n4e28+-3cpv_EdG0E0YT5uf3ppYNFamw at mail dot gmail dot com> <562F818A dot 90003 at foss dot arm dot com>
>
> OK, then it's fairly x86-64 specific optimization, because we can't do "call *mem" in
> aarch64 and some other targets.
It is a fairly x86_64 specific optimization and doesn't apply to AArch64.
The question really is what impact does removing the generic code handling have on aarch64 - is it a no-op or not for the existing -fno-plt implementation in the AArch64 backend ? The only case that is of interest is the bit below in calls.c and it looks like that may well be redundant with the logic in the backend already, but I have not done the full analysis to convince myself that the code in the backend is sufficient.
- && (!flag_plt
- || lookup_attribute ("noplt", DECL_ATTRIBUTES (fndecl_or_type)))
- && !targetm.binds_local_p (fndecl_or_type))
regards
Ramana