From c4952e513f845a0e290d22ed1131d1b6438bb65b Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Fri, 27 Sep 2024 08:09:10 -0700 Subject: [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. --- llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp') 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; } -- cgit v1.1