[llvm] [MemProf] Use remove_if to erase MapVector elements in bulk (PR #94269)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 20:43:51 PDT 2024


================
@@ -1694,11 +1682,10 @@ void CallsiteContextGraph<DerivedCCG, FuncTy,
   MapVector<CallInfo, ContextNode *> TailCallToContextNodeMap;
 
   for (auto Entry = NonAllocationCallToContextNodeMap.begin();
-       Entry != NonAllocationCallToContextNodeMap.end();) {
+       Entry != NonAllocationCallToContextNodeMap.end(); Entry++) {
----------------
teresajohnson wrote:

Yeah, good idea, we can do that now. My local branch seems to have gotten messed up, so I am going to merge this one, then make a separate NFC follow on change to do that.

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


More information about the llvm-commits mailing list