[llvm] [MemProf] Perform cloning for each allocation separately (PR #87112)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 13:36:03 PDT 2024


================
@@ -2468,8 +2533,10 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::
 template <typename DerivedCCG, typename FuncTy, typename CallTy>
 void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::identifyClones() {
   DenseSet<const ContextNode *> Visited;
-  for (auto &Entry : AllocationCallToContextNodeMap)
-    identifyClones(Entry.second, Visited);
+  for (auto &Entry : AllocationCallToContextNodeMap) {
+    Visited.clear();
----------------
teresajohnson wrote:

No it was not necessary, because before we were attempting to do all cloning for each node once. Now we may revisit each node to consider cloning for each allocation it affects separately.

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


More information about the llvm-commits mailing list