[llvm-dev] Restrict global constructors to base ISA
Jeffrey Walton via llvm-dev
llvm-dev at lists.llvm.org
Wed Dec 5 03:28:15 PST 2018
On Mon, Dec 3, 2018 at 2:30 PM Friedman, Eli <efriedma at codeaurora.org> wrote:
> > How do we tell Clang to use the base ISA for global constructors?
> There isn't any way to specifically restrict the ISA for global
> constructors/inline functions/etc. The inverse works, though: you can
> specify the base ISA for the whole file, then mark specific functions
> using __attribute__((target("avx2"))).
It looks like this is becoming more of a problem as CPU advance and
folks try to add multiple implementations.
The problem with attributes is, it is too new. They did not appear
until GCC 5 for x86_64, and GCC 6 for ARM. They also seem to be
missing for some platforms, like MIPS and PowerPC. We support back to
GCC 3 and Visual Studio 2002 for our sources so we need something more
More information about the llvm-dev