aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2024-09-27 08:09:10 -0700
committerGitHub <noreply@github.com>2024-09-27 08:09:10 -0700
commitc4952e513f845a0e290d22ed1131d1b6438bb65b (patch)
tree6cfb8e18cbb5239c847d3d9565bb15ba1c4677f4 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent1fd1f65569f565b5b06fd9464b3b91fcd6f2fa2a (diff)
downloadllvm-c4952e513f845a0e290d22ed1131d1b6438bb65b.zip
llvm-c4952e513f845a0e290d22ed1131d1b6438bb65b.tar.gz
llvm-c4952e513f845a0e290d22ed1131d1b6438bb65b.tar.bz2
[nfc][ctx_prof] Efficient profile traversal and update (#110052)
This optimizes profile updates and visits, where we want to access contexts for a specific function. These are all the current update cases. We do so by maintaining a list of contexts for each function, preserving preorder traversal. The list is updated whenever contexts are `std::move`-d or deleted.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 25a0155..671b0d0 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -2375,7 +2375,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
assert(Deleted);
(void)Deleted;
};
- CtxProf.update(Updater, &Caller);
+ CtxProf.update(Updater, Caller);
return Ret;
}