Using constexpr we can flatten the feature dependency tree at
compile-time so that no computation is required at run-time.
Details
- Reviewers
nickdesaulniers craig.topper MaskRay
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Support/X86TargetParser.cpp | ||
---|---|---|
581 | Doesn't this violate the no global constructor rule? |
llvm/lib/Support/X86TargetParser.cpp | ||
---|---|---|
581 | Oh yikes, yes it does. I tried making the map a function level static variable, but this code is apparently called by multiple threads in some cases so we run into race condition. Should I switch to a static array and just do a linear search through the array? |
Do you have compile time numbers for this after https://reviews.llvm.org/D85807 ?
llvm/lib/Support/X86TargetParser.cpp | ||
---|---|---|
583 | I've never seen COUNTER before. Is it supported by all the compilers we support. I couldn't find other uses in tree. |
llvm/lib/Support/X86TargetParser.cpp | ||
---|---|---|
583 | It is. I believe it's a GNU C feature. But it's heavily used in Linux. |
clang-tidy: warning: invalid case style for function 'ImpliedEnabledFeatures' [readability-identifier-naming]
not useful