[all-commits] [llvm/llvm-project] a2e596: [LegacyPM] Reduce number of calls to getName
aengelke via All-commits
all-commits at lists.llvm.org
Thu Apr 13 02:19:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a2e596bdf8cc951727f1f0156c56ff90cb00e8a0
https://github.com/llvm/llvm-project/commit/a2e596bdf8cc951727f1f0156c56ff90cb00e8a0
Author: Alexis Engelke <engelke at in.tum.de>
Date: 2023-04-13 (Thu, 13 Apr 2023)
Changed paths:
M llvm/lib/IR/LegacyPassManager.cpp
Log Message:
-----------
[LegacyPM] Reduce number of calls to getName
Repeatedly calling getName adds some overhead, which can be easily
avoided by querying the name just once per function. The improvements
are rather small (~0.5% back-end time in a compile-time optimized
setting), but also very easy to achieve.
Note that getting the name should be entirely avoidable in the common
case, but would require more substantial changes.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D148145
More information about the All-commits
mailing list