aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2025-04-07 19:55:00 -0700
committerGitHub <noreply@github.com>2025-04-07 19:55:00 -0700
commitf1bb2fe3562d2fe9a43c79ec8af908fdff23a33a (patch)
treee4a3514aa148064b9cb786688b744efe978f1093 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent6a3e5f89bb89548fb39ca241c8ed7c2005a190f1 (diff)
downloadllvm-f1bb2fe3562d2fe9a43c79ec8af908fdff23a33a.zip
llvm-f1bb2fe3562d2fe9a43c79ec8af908fdff23a33a.tar.gz
llvm-f1bb2fe3562d2fe9a43c79ec8af908fdff23a33a.tar.bz2
[ctxprof] Use `isInSpecializedModule` as criteria for using contextual profile (#134468)
After #134340, the availability of contextual profile isn't in itself an indication of compiling the module containing all the functions covered by that profile.
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 131fbe6..5beee1f 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -2356,7 +2356,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
AAResults *CalleeAAR,
bool InsertLifetime,
Function *ForwardVarArgsTo) {
- if (CtxProf.contexts().empty())
+ if (!CtxProf.isInSpecializedModule())
return InlineFunction(CB, IFI, MergeAttributes, CalleeAAR, InsertLifetime,
ForwardVarArgsTo);