[llvm] [TLI] Make VecDesc statically initializable (PR #211307)
Valery Chernov via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 23:21:31 PDT 2026
vvchernov wrote:
> > Can you mark the tables `constinit` to prevent regressions? This might require changing tablegen.
>
> Is this feasible? I think it's a trivial tablegen change. If it doesn't work, it doesn't work.
Hello @rnk! `constinit` isn't supported by C++17 which is default for LLVM now. So I changed `const` to `constexpr` for VecDesc tables in `TargetLibraryInfo.cpp` and added comment about change it into `constinit` when LLVM requires C++20. Correct me if I wrongly caught your idea.
Speaking of tablegen: the VecFuncs_* tables are built from VecFuncs.def not TableGen, so no changes are needed.
https://github.com/llvm/llvm-project/pull/211307
More information about the llvm-commits
mailing list