[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 4 17:40:15 PDT 2020


nickdesaulniers added a comment.

In D83273#2194869 <https://reviews.llvm.org/D83273#2194869>, @echristo wrote:

> That said, it's a 10% compile time regression for compiling something like the linux kernel or anything that's very explicit what flags they set.

Digging into the profile a little deeper:

  +    9.20%  [.] getImpliedDisabledFeatures
  +    1.46%  [.] llvm::X86::getImpliedFeatures
     - 3.00% llvm::StringMapImpl::LookupBucketFor
        + 1.55% llvm::StringMap<clang::IdentifierInfo*, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul> >::try_emplace<clang::IdentifierInfo*>
        - 1.11% llvm::StringMap<bool, llvm::MallocAllocator>::try_emplace<>
           + 1.11% clang::targets::X86TargetInfo::setFeatureEnabled
  +    1.46%  [.] llvm::X86::getImpliedFeatures

so potentially a 13.23% compile time savings for the entire codebase.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83273/new/

https://reviews.llvm.org/D83273



More information about the cfe-commits mailing list