aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/RegisterCoalescer.cpp
diff options
context:
space:
mode:
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();