[llvm] Fix dangling IPOAmendableCB function_ref. (PR #120698)
Haojian Wu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 00:06:49 PST 2025
================
@@ -1352,9 +1352,10 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM,
return !AMDGPU::isEntryFunctionCC(Callee.getCallingConv()) &&
(NumAssumedCallees <= IndirectCallSpecializationThreshold);
};
- AC.IPOAmendableCB = [](const Function &F) {
+ auto IPOAmendableCB = [](const Function &F) {
return F.getCallingConv() == CallingConv::AMDGPU_KERNEL;
};
+ AC.IPOAmendableCB = IPOAmendableCB;
----------------
hokein wrote:
Thanks, changed the IPOAmendableCB's type from `llvm::function_ref` to `std::function`
https://github.com/llvm/llvm-project/pull/120698
More information about the llvm-commits
mailing list