diff options
author | Kazu Hirata <kazu@google.com> | 2021-02-17 23:58:46 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-02-17 23:58:46 -0800 |
commit | 61efa3d93f733c6310abf079cd27f99868c38461 (patch) | |
tree | 7ee890edd7c783f4d1be4bb8c0cd6eee8efd7893 /llvm/lib/CodeGen/RDFGraph.cpp | |
parent | e54579307b15ac0adfe96c5422e9cdd228ed1a76 (diff) | |
download | llvm-61efa3d93f733c6310abf079cd27f99868c38461.zip llvm-61efa3d93f733c6310abf079cd27f99868c38461.tar.gz llvm-61efa3d93f733c6310abf079cd27f99868c38461.tar.bz2 |
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/RDFGraph.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RDFGraph.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RDFGraph.cpp b/llvm/lib/CodeGen/RDFGraph.cpp index cebb902..f605068 100644 --- a/llvm/lib/CodeGen/RDFGraph.cpp +++ b/llvm/lib/CodeGen/RDFGraph.cpp @@ -994,8 +994,8 @@ RegisterRef DataFlowGraph::restrictRef(RegisterRef AR, RegisterRef BR) const { // For each stack in the map DefM, push the delimiter for block B on it. void DataFlowGraph::markBlock(NodeId B, DefStackMap &DefM) { // Push block delimiters. - for (auto I = DefM.begin(), E = DefM.end(); I != E; ++I) - I->second.start_block(B); + for (auto &P : DefM) + P.second.start_block(B); } // Remove all definitions coming from block B from each stack in DefM. @@ -1003,8 +1003,8 @@ void DataFlowGraph::releaseBlock(NodeId B, DefStackMap &DefM) { // Pop all defs from this block from the definition stack. Defs that were // added to the map during the traversal of instructions will not have a // delimiter, but for those, the whole stack will be emptied. - for (auto I = DefM.begin(), E = DefM.end(); I != E; ++I) - I->second.clear_block(B); + for (auto &P : DefM) + P.second.clear_block(B); // Finally, remove empty stacks from the map. for (auto I = DefM.begin(), E = DefM.end(), NextI = I; I != E; I = NextI) { |