[llvm] [MemProf] Support cloning for indirect calls with ThinLTO (PR #110625)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 9 20:35:52 PDT 2024
================
@@ -4108,6 +4456,119 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
I.setMetadata(LLVMContext::MD_callsite, nullptr);
}
}
+
+ // Now do any promotion required for cloning. Specifically, for each
+ // recorded ICP candidate (which was only recorded because one clone of that
+ // candidate should call a cloned target), we perform ICP (speculative
+ // devirtualization) for each clone of the callsite, and update its callee
+ // to the appropriate clone. Note that the ICP compares against the original
+ // version of the target, which is what is in the vtable.
+ for (auto &ICallInfo : ICallAnalysisMap) {
+ auto *CB = ICallInfo.first;
+ auto &Info = ICallInfo.second;
----------------
teresajohnson wrote:
done
https://github.com/llvm/llvm-project/pull/110625
More information about the llvm-commits
mailing list