On 05/06/2017 12:44 AM, Richard Sandiford wrote:
Michael Meissner <meiss...@linux.vnet.ibm.com> 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.
Likewise.
jeff