File tree 2 files changed +4
-1
lines changed 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ class MachineDominatorTree : public DomTreeBase<MachineBasicBlock> {
266
266
// / \brief Analysis pass which computes a \c MachineDominatorTree.
267
267
class MachineDominatorTreeWrapperPass : public MachineFunctionPass {
268
268
MachineDominatorTree DT;
269
+ bool IsDomTreeEmpty = true ;
269
270
270
271
public:
271
272
static char ID;
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ MachineDominatorTreeWrapperPass::MachineDominatorTreeWrapperPass()
70
70
char &llvm::MachineDominatorsID = MachineDominatorTreeWrapperPass::ID;
71
71
72
72
bool MachineDominatorTreeWrapperPass::runOnMachineFunction (MachineFunction &F) {
73
+ IsDomTreeEmpty = false ;
73
74
DT.calculate (F);
74
75
return false ;
75
76
}
@@ -83,10 +84,11 @@ void MachineDominatorTree::calculate(MachineFunction &F) {
83
84
void MachineDominatorTreeWrapperPass::releaseMemory () {
84
85
DT.CriticalEdgesToSplit .clear ();
85
86
DT.reset ();
87
+ IsDomTreeEmpty = true ;
86
88
}
87
89
88
90
void MachineDominatorTreeWrapperPass::verifyAnalysis () const {
89
- if (VerifyMachineDomInfo)
91
+ if (VerifyMachineDomInfo && !IsDomTreeEmpty )
90
92
if (!DT.verify (MachineDominatorTree::VerificationLevel::Basic))
91
93
report_fatal_error (" MachineDominatorTree verification failed!" );
92
94
}
You can’t perform that action at this time.
0 commit comments