[PATCH] D85257: [X86] Optimize getImpliedDisabledFeatures & getImpliedEnabledFeatures

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 18:25:05 PDT 2020


MaskRay added a comment.

In D85257#2195075 <https://reviews.llvm.org/D85257#2195075>, @nickdesaulniers wrote:

> I'll try to get some numbers comparing overall build time, and full build profiles with this applied, tomorrow. Thanks for the hard work! (And I'll work with @Nathan-Huckleberry on the suggestion for `Sema::ActOnGCCAsmStmt`.  We can likely save a pointer to the `llvm::StringMap<bool> FeatureMap` within `Sema` and only recompute it if we have a `target` function attribute).

For my trivial -march=native example, `Target->getTargetOpts().Features.size()` is 82:

  {"+64bit", "+adx", "+aes", "+avx", "+avx2", "+avx512bw", "+avx512cd", "+avx512dq", "+avx512f", "+avx512v
  l", "+bmi", "+bmi2", "+clflushopt", "+clwb", "+cmov", "+cx16", "+cx8", "+f16c", "+fma", "+fsgsbase", "+fxsr", "+invpcid", "+lzcnt", "+mmx", "+movbe",
  "+pclmul", "+pku", "+popcnt", "+prfchw", "+sahf", "+sse", "+sse2", "+sse3", "+sse4.1", "+sse4.2", "+ssse3", "+x87", "+xsave", "+xsavec", "+xsaves", "-
  amx-bf16", "-amx-int8", "-amx-tile", "-avx512bf16", "-avx512bitalg", "-avx512er", "-avx512ifma", "-avx512pf", "-avx512vbmi", "-avx512vbmi2", "-avx512v
  nni", "-avx512vp2intersect", "-avx512vpopcntdq", "-cldemote", "-clzero", "-enqcmd", "-fma4", "-gfni", "-lwp", "-movdir64b", "-movdiri", "-mwaitx", "-p

You may check whether there is improvement room. I'd be wary of making caching as latent caching invalidation bugs would be difficult to debug :(


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85257



More information about the llvm-commits mailing list