aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/RegisterCoalescer.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-12-06 08:49:10 -0800
committerKazu Hirata <kazu@google.com>2021-12-06 08:49:10 -0800
commitc4a8928b51daa486013abbfa4dad75def2a9528e (patch)
treea47955bbcc57b103e80cabcc6bd59f5beb0f4cd0 /llvm/lib/CodeGen/RegisterCoalescer.cpp
parenta05a0c3c2f8eefc80d84b7a87a23a4452d4a3087 (diff)
downloadllvm-c4a8928b51daa486013abbfa4dad75def2a9528e.zip
llvm-c4a8928b51daa486013abbfa4dad75def2a9528e.tar.gz
llvm-c4a8928b51daa486013abbfa4dad75def2a9528e.tar.bz2
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 4c8534cf..a917b0d 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -4067,13 +4067,13 @@ void RegisterCoalescer::joinAllIntervals() {
// Coalesce intervals in MBB priority order.
unsigned CurrDepth = std::numeric_limits<unsigned>::max();
- for (unsigned i = 0, e = MBBs.size(); i != e; ++i) {
+ for (MBBPriorityInfo &MBB : MBBs) {
// Try coalescing the collected local copies for deeper loops.
- if (JoinGlobalCopies && MBBs[i].Depth < CurrDepth) {
+ if (JoinGlobalCopies && MBB.Depth < CurrDepth) {
coalesceLocals();
- CurrDepth = MBBs[i].Depth;
+ CurrDepth = MBB.Depth;
}
- copyCoalesceInMBB(MBBs[i].MBB);
+ copyCoalesceInMBB(MBB.MBB);
}
lateLiveIntervalUpdate();
coalesceLocals();