[PATCH] D148022: [LegacyPM] Call getPassName only when needed

Alexis Engelke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 09:32:21 PDT 2023


aengelke added a comment.

In D148022#4259195 <https://reviews.llvm.org/D148022#4259195>, @MaskRay wrote:

> Ideally give some numbers. How costly is it?

I measured an improvement between 0.5% and 1% in our (fairly compile-time optimized) setting.

> Is the cost mainly due to `PassInfoMap.lookup(TI)`?

Mostly yes, but also the mutex in `PassRegistry::getPassInfo` and the virtual function call itself contribute overhead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148022



More information about the llvm-commits mailing list