[clang] [llvm] [Clang][Lexer] Reland "Detect SSE4.2 availability at runtime in fastParseASCIIIdentifier" (PR #180631)
Thibault Monnier via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 8 06:11:08 PDT 2026
Thibault-Monnier wrote:
> But I still feel it will open a Pandora’s box. I really don’t want to see a situation decades from now still trapped in the original x86-64 without extensions.
Sure, but does that really justify intentionally reducing performance for default builds? Maybe in other cases it does, but in this case the performance difference between runtime check and -march is negligeable (and even invisible because of the noise). Adding a runtime dispatch won't help distros switch to -march builds, but it is for the valid reason that -march makes no difference in this case.
The compromise seems to me more between improving performance (in the short-term at least) at the cost of 50 lines of code, and doing nothing. The nothing route is justifiable by the fact this PR may become somewhat obsolete in a few years from now, but at the same time the runtime dispatch doesn't seem to have any real negative aspect to it.
https://github.com/llvm/llvm-project/pull/180631
More information about the cfe-commits
mailing list