aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/IntervalPartition.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-12-02 21:02:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-12-02 21:02:54 +0000
commitf65dcba83ce5035ab88a85fe17628b447eb56e1b (patch)
tree35f37bb72b3cfc6060193e66c76ee7c9478969b0 /llvm/lib/Analysis/IntervalPartition.cpp
parent846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb (diff)
Diffstat (limited to 'llvm/lib/Analysis/IntervalPartition.cpp')
-rw-r--r--llvm/lib/Analysis/IntervalPartition.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/IntervalPartition.cpp b/llvm/lib/Analysis/IntervalPartition.cpp
index 23ff4fd6f85e..d9620fd405bc 100644
--- a/llvm/lib/Analysis/IntervalPartition.cpp
+++ b/llvm/lib/Analysis/IntervalPartition.cpp
@@ -36,16 +36,16 @@ INITIALIZE_PASS(IntervalPartition, "intervals",
// releaseMemory - Reset state back to before function was analyzed
void IntervalPartition::releaseMemory() {
- for (unsigned i = 0, e = Intervals.size(); i != e; ++i)
- delete Intervals[i];
+ for (Interval *I : Intervals)
+ delete I;
IntervalMap.clear();
Intervals.clear();
RootInterval = nullptr;
}
void IntervalPartition::print(raw_ostream &O, const Module*) const {
- for(unsigned i = 0, e = Intervals.size(); i != e; ++i)
- Intervals[i]->print(O);
+ for (const Interval *I : Intervals)
+ I->print(O);
}
// addIntervalToPartition - Add an interval to the internal list of intervals,
@@ -87,8 +87,8 @@ bool IntervalPartition::runOnFunction(Function &F) {
// Now that we know all of the successor information, propagate this to the
// predecessors for each block.
- for (unsigned i = 0, e = Intervals.size(); i != e; ++i)
- updatePredecessors(Intervals[i]);
+ for (Interval *I : Intervals)
+ updatePredecessors(I);
return false;
}
@@ -113,6 +113,6 @@ IntervalPartition::IntervalPartition(IntervalPartition &IP, bool)
// Now that we know all of the successor information, propagate this to the
// predecessors for each block.
- for (unsigned i = 0, e = Intervals.size(); i != e; ++i)
- updatePredecessors(Intervals[i]);
+ for (Interval *I : Intervals)
+ updatePredecessors(I);
}