[llvm] 4973ad4 - [MemProf][NFC] Use range for loop (#94308)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 21:15:43 PDT 2024


Author: Teresa Johnson
Date: 2024-06-03T21:15:40-07:00
New Revision: 4973ad47181710d2a69292018cad7bc6f95a6c1a

URL: https://github.com/llvm/llvm-project/commit/4973ad47181710d2a69292018cad7bc6f95a6c1a
DIFF: https://github.com/llvm/llvm-project/commit/4973ad47181710d2a69292018cad7bc6f95a6c1a.diff

LOG: [MemProf][NFC] Use range for loop (#94308)

With the change in 2fa059195bb54f422cc996db96ac549888268eae we can now
use a range for loop.

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
index d141fd9e0b495..03923b83cf34c 100644
--- a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+++ b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
@@ -1681,9 +1681,8 @@ void CallsiteContextGraph<DerivedCCG, FuncTy,
   // from the profiled contexts.
   MapVector<CallInfo, ContextNode *> TailCallToContextNodeMap;
 
-  for (auto Entry = NonAllocationCallToContextNodeMap.begin();
-       Entry != NonAllocationCallToContextNodeMap.end(); Entry++) {
-    auto *Node = Entry->second;
+  for (auto &Entry : NonAllocationCallToContextNodeMap) {
+    auto *Node = Entry.second;
     assert(Node->Clones.empty());
     // Check all node callees and see if in the same function.
     auto Call = Node->Call.call();


        


More information about the llvm-commits mailing list