We can use this to remove some calls to initFeatureMap from Sema
and CodeGen when a function doesn't have a target attribute.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM; comparing the report at the bottom of https://reviews.llvm.org/D85257#2197114, repasted (before this patch):
+ 3.59% clang-12 [.] llvm::X86::getImpliedFeatures
- 3.36% clang-12 [.] llvm::StringMapImpl::LookupBucketFor
- 3.32% llvm::StringMapImpl::LookupBucketFor
- 1.24% llvm::StringMap<bool, llvm::MallocAllocator>::try_emplace<>
+ 1.24% clang::targets::X86TargetInfo::setFeatureEnabledElapsed (wall clock) time (h:mm:ss or m:ss): 0:53.39
(After this patch):
A profile of a full x86_64 build with this applied, none of the above appear in the profile. clang::targets::X86TargetInfo::setFeatureEnabled, does but near at the bottom with < 0.00%. So this shaves another ~5% off build times!
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:50.98