aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2025-03-04 16:42:47 -0800
committerGitHub <noreply@github.com>2025-03-04 16:42:47 -0800
commit2068a18c86ab0f6f80e268dc3bc1a5329ee51715 (patch)
treea9bc6cd91716901c221487a721712d80d828c965 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parente739ce2e10e60a2f3363b1ba26c388c7d7aa7bd4 (diff)
downloadllvm-2068a18c86ab0f6f80e268dc3bc1a5329ee51715.zip
llvm-2068a18c86ab0f6f80e268dc3bc1a5329ee51715.tar.gz
llvm-2068a18c86ab0f6f80e268dc3bc1a5329ee51715.tar.bz2
[ctxprof][nfc] Prepare CtxProfAnalysis for flat profiles (#129623)
Mostly remove the equivalence "no contexts == no CtxProfAnalysis result", and instead check explicitly there are no contextual profiles.
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 c78cd0b..66fda5b 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -2357,7 +2357,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
AAResults *CalleeAAR,
bool InsertLifetime,
Function *ForwardVarArgsTo) {
- if (!CtxProf)
+ if (CtxProf.contexts().empty())
return InlineFunction(CB, IFI, MergeAttributes, CalleeAAR, InsertLifetime,
ForwardVarArgsTo);