c3c
c3c copied to clipboard
Implement @multitarget attribute
This works similar to @cputarget but implements switching to be selected at runtime automatically.
void foo @multitarget("avx2;atom", "ivybridge", "default")
{ ... }
The above would create versions for avx2+atom, ivybridge and the default. At runtime the right one would be selected.
This works like "target_clones" in Clang.
There are problems with target clones in GCC/Clang as they don't work on all platforms. Better push this to userland.