summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineDominators.cpp
diff options
context:
space:
mode:
authorJakub Kuderski <kubakuderski@gmail.com>2019-10-01 18:27:14 +0000
committerJakub Kuderski <kubakuderski@gmail.com>2019-10-01 18:27:14 +0000
commit925c285f438190ae6cc3919c24456568ccf921a4 (patch)
tree6f49a4d9457dbb77a58904bb43bdeceb5ea83193 /llvm/lib/CodeGen/MachineDominators.cpp
parent1f345cb05d82c6502ea3ee753e851adc76e30d7a (diff)
downloadbcm5719-llvm-925c285f438190ae6cc3919c24456568ccf921a4.tar.gz
bcm5719-llvm-925c285f438190ae6cc3919c24456568ccf921a4.zip
Reapply [Dominators][CodeGen] Clean up MachineDominators
This reverts r373117 (git commit 159ef37735f21ae373282e0c53cbd9b6af1e0dfd) Phabricator review: https://reviews.llvm.org/D67976. llvm-svn: 373376
Diffstat (limited to 'llvm/lib/CodeGen/MachineDominators.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineDominators.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp
index b569ca42d68..706c706d752 100644
--- a/llvm/lib/CodeGen/MachineDominators.cpp
+++ b/llvm/lib/CodeGen/MachineDominators.cpp
@@ -67,21 +67,11 @@ void MachineDominatorTree::releaseMemory() {
}
void MachineDominatorTree::verifyAnalysis() const {
- if (DT && VerifyMachineDomInfo) {
- MachineFunction &F = *getRoot()->getParent();
-
- DomTreeBase<MachineBasicBlock> OtherDT;
- OtherDT.recalculate(F);
- if (getRootNode()->getBlock() != OtherDT.getRootNode()->getBlock() ||
- DT->compare(OtherDT)) {
- errs() << "MachineDominatorTree for function " << F.getName()
- << " is not up to date!\nComputed:\n";
- DT->print(errs());
- errs() << "\nActual:\n";
- OtherDT.print(errs());
+ if (DT && VerifyMachineDomInfo)
+ if (!DT->verify(DomTreeT::VerificationLevel::Basic)) {
+ errs() << "MachineDominatorTree verification failed\n";
abort();
}
- }
}
void MachineDominatorTree::print(raw_ostream &OS, const Module*) const {
OpenPOWER on IntegriCloud