[llvm] [StrTable] Use string literal emission for intrinsics on non-MSVC platforms (PR #124856)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 10:54:24 PST 2025


rnk wrote:

> You'll also need to update the Clang CMake to invoke `clang-tblgen` with this flag at least.

That's true, I had already seen the logic to limit this option to the LLVM subproject and I forgot to remove that condition now that this flag is part of lib/TableGen and part of all `tblgen` binaries. That change is present now.

> I'd very much like to wait until #120534 is merged before landing this because the string tables in LLVM itself, for an unknown reason, are not enough to trigger the miscompile for some of our MSVC users. We actually need the string tables in Clang as well. So until #120534 lands, you won't easily be able to tell if this PR regresses things. This is also why the failure to pass the flag in `clang-tblgen` likely has no effect (yet).

This can wait, but keep in mind that if you sequence it this way you are going to get character arrays, which are slower to parse, for those new large string tables in clang. I don't have data, but I do remember this being a bottleneck at some point in the past for LLVM intrinsic parsing, which is why I'm bothering to retain this optimization.

https://github.com/llvm/llvm-project/pull/124856


More information about the llvm-commits mailing list