Even when time tracing is disabled, getPassName is currently still
called. This adds an avoidable virtual function call for each pass.
Fetching the pass name only when required slightly improves
compile-time (particularly when LLVM is built without LTO).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Ideally give some numbers. How costly is it? Is the cost mainly due to PassInfoMap.lookup(TI)?
Comment Actions
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.