[llvm] [MemProf][NFC] Use range for loop (PR #94308)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 21:15:15 PDT 2024
https://github.com/teresajohnson created https://github.com/llvm/llvm-project/pull/94308
With the change in 2fa059195bb54f422cc996db96ac549888268eae we can now
use a range for loop.
>From 9d5f54a585183acec53c6c48965c9dacb2dac74e Mon Sep 17 00:00:00 2001
From: Teresa Johnson <tejohnson at google.com>
Date: Mon, 3 Jun 2024 20:46:59 -0700
Subject: [PATCH] [MemProf][NFC] Use range for loop
With the change in 2fa059195bb54f422cc996db96ac549888268eae we can now
use a range for loop.
---
llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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