I noticed that the
pentium-m) target CPUs causes LLVM 6.0 to use different instruction scheduling that e.g. when targeting 32-bit code to the generic
I’d expect the primary use case of the
i686 targets to be less about supporting Pentium 4-era hardware and more about supporting users who have a newer 64-bit CPU but who are stuck with a 32-bit OS for whatever reason (were told 64-bit has no benefits unless the computer has RAM above a certain threshold, were told Flash didn’t work on Linux and have been updating the system in place ever since, installed Windows when 32-bit Windows was the norm, have Chrome OS pull 32-bit Android binaries from the Play Store).
The changeset that the
pentium4 default comes from said that clang has the same default. Is that still true as of clang 6.0?
Should the default be adjusted so that it still doesn’t go beyond SSE2 in terms of what instruction set extensions are OK to generate but so that it causes instruction scheduling to be optimized for newer CPUs?
(I’ve been told that
-mtune in clang is a no-op, so I don’t know what the appropriate way is to request newer instruction scheduling from LLVM without having to manually turn off a bunch of instruction set extensions. I’m not sure what instruction set extensions the
x86-64 CPU implies, precisely. It is possible to compile 32-bit code for it just like for any non-virtual 64-bit-capable target CPU.)