Skip to content

Commit 001998c

Browse files
committed
Use LoopInfo.verify() instead of coding this ourselves
1 parent e806fd2 commit 001998c

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

lib/SIL/LoopInfo.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,5 @@ bool SILLoop::canDuplicate(SILInstruction *I) const {
8282
}
8383

8484
void SILLoopInfo::verify() const {
85-
llvm::DenseSet<const SILLoop*> Loops;
86-
for (iterator I = begin(), E = end(); I != E; ++I) {
87-
assert(!(*I)->getParentLoop() && "Top-level loop has a parent!");
88-
(*I)->verifyLoopNest(&Loops);
89-
}
90-
91-
// We need access to the map for this.
92-
// Verify that blocks are mapped to valid loops.
93-
for (llvm::DenseMap<const SILBasicBlock *, SILLoop *>::const_iterator
94-
I = LI.getBlockMap().begin(),
95-
E = LI.getBlockMap().end();
96-
I != E; ++I) {
97-
assert(Loops.count(I->second) && "orphaned loop");
98-
assert(I->second->contains(I->first) && "orphaned block");
99-
}
85+
LI.verify();
10086
}

0 commit comments

Comments
 (0)