target_clones: molehill or everest?
Bruce Carneal
bcarneal at gmail.com
Tue Jun 7 16:15:03 UTC 2022
On Tuesday, 7 June 2022 at 15:50:56 UTC, kinke wrote:
> On Tuesday, 7 June 2022 at 14:18:11 UTC, Bruce Carneal wrote:
>> Would adding clang's *target_clones* attribute be difficult?
>
> Hmm, it's apparently not supported in LLVM IR directly; the IR
> changes for clang are substantial:
> https://cpp.godbolt.org/z/WT56axqj1
>
> So unless the LLVM API provides a helper (mainly generating the
> resolver with its conditions depending on some
> `__cpu_indicator_init()` and `__cpu_model`), it's probably
> difficult indeed.
Thanks for checking. I'll look at gcd (thanks Iain) and at
another CT hack that groups and manages the target funcs manually.
More information about the digitalmars-d-ldc
mailing list