aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm16
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-02-19 19:03:57 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-02-19 19:22:10 +0300
commit119e8024f38bae4f04fd372110f45ddb2c01d71f (patch)
tree4bad5cc40a4c9090ba4005561745ca559d00da6f /contrib/libs/llvm16
parent793447a2b4ab1e8ac2b8d1773c8cbbc0e34d31ab (diff)
downloadydb-119e8024f38bae4f04fd372110f45ddb2c01d71f.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/libs/llvm16')
-rw-r--r--contrib/libs/llvm16/lib/IR/LegacyPassManager.cpp5
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 ef34651776..f9572cc246 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);