diff options
| author | robot-piglet <[email protected]> | 2024-02-19 19:03:57 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2024-02-19 19:22:10 +0300 |
| commit | 119e8024f38bae4f04fd372110f45ddb2c01d71f (patch) | |
| tree | 4bad5cc40a4c9090ba4005561745ca559d00da6f /contrib/libs/llvm16/lib | |
| parent | 793447a2b4ab1e8ac2b8d1773c8cbbc0e34d31ab (diff) | |
Intermediate changes
Diffstat (limited to 'contrib/libs/llvm16/lib')
| -rw-r--r-- | contrib/libs/llvm16/lib/IR/LegacyPassManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/libs/llvm16/lib/IR/LegacyPassManager.cpp b/contrib/libs/llvm16/lib/IR/LegacyPassManager.cpp index ef346517764..f9572cc2466 100644 --- a/contrib/libs/llvm16/lib/IR/LegacyPassManager.cpp +++ b/contrib/libs/llvm16/lib/IR/LegacyPassManager.cpp @@ -1414,7 +1414,10 @@ bool FPPassManager::runOnFunction(Function &F) { FunctionPass *FP = getContainedPass(Index); bool LocalChanged = false; - llvm::TimeTraceScope PassScope("RunPass", FP->getPassName()); + // Call getPassName only when required. The call itself is fairly cheap, but + // still virtual and repeated calling adds unnecessary overhead. + llvm::TimeTraceScope PassScope( + "RunPass", [FP]() { return std::string(FP->getPassName()); }); dumpPassInfo(FP, EXECUTION_MSG, ON_FUNCTION_MSG, F.getName()); dumpRequiredSet(FP); |
