This is the mail archive of the
mailing list for the GCC project.
Re: GCC target_clone support (functionality question)
- From: Jeff Law <law at redhat dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, GCC mailing list <gcc at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>, Uros Bizjak <ubizjak at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, Richard Biener <rguenther at suse dot de>, Richard Henderson <rth at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Richard Earnshaw <richard dot earnshaw at arm dot com>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Nick Clifton <nickc at redhat dot com>, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>, Bernd Schmidt <bschmidt at redhat dot com>, Hartmut Penner <hepenner at us dot ibm dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>, Andreas Krebbel <Andreas dot Krebbel at de dot ibm dot com>, Evgeny Stupachenko <evstupac at gmail dot com>, richard dot sandiford at linaro dot org
- Date: Mon, 8 May 2017 16:14:04 -0600
- Subject: Re: GCC target_clone support (functionality question)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5845F80F9B
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5845F80F9B
- References: <20170505181859.GA11428@ibm-tiger.the-meissners.org> <20170505184530.GA15560@ibm-tiger.the-meissners.org> <email@example.com>
On 05/06/2017 12:44 AM, Richard Sandiford wrote:
Michael Meissner <firstname.lastname@example.org> writes:
This message is separated from the question about moving code, as it is a
questions about the functionality of target_clone support.
Right now it looks like target_clone only generates the ifunc handler if there
is a call to the function in the object file. It does not generate the ifunc
handler if there is no call.
For the default function, it generates the normal name. This means that any
function that calls the function from a different object module will only get
the standard function. From a library and user perspective, I think this is
wrong. Instead the default function should be generated with a different name,
and the ifunc function should list the standard name. Then you don't have to
change all of the other calls in the object file, the normal ifunc handling
will handle it. It also means you can more easily put this function in a
library and automatically call the appropriate version.
Yeah, that sounds much more useful. One thing on my wish list is to
support target_clone for Advanced SIMD vs. SVE on AArch64 (although
it's unlikely that'll happen in the GCC 8 timeframe). I'd naively
assumed it would already work in the way you suggested.