[llvm] [MemProf] Support cloning for indirect calls with ThinLTO (PR #110625)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 20:15:12 PDT 2024


================
@@ -4075,24 +4367,80 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
                      << ore::NV("Attribute", AllocTypeString));
           }
         } else if (!CallsiteContext.empty()) {
-          // Consult the next callsite node.
-          assert(SI != FS->callsites().end());
-          auto &StackNode = *(SI++);
-
+          if (!CalledFunction) {
----------------
teresajohnson wrote:

done on moving this handling to a helper. I made ICallAnalysis a private member, however it is initialized by another helper at the beginning of applyImport, since it isn't needed in other cases that use this class (e.g. fullLTO). I didn't move ICallAnalysisMap (now ICallAnalysisInfo) since that is a per-function data structure.

https://github.com/llvm/llvm-project/pull/110625


More information about the llvm-commits mailing list