Index: lib/IR/Dominators.cpp =================================================================== --- lib/IR/Dominators.cpp +++ lib/IR/Dominators.cpp @@ -282,9 +282,6 @@ } void DominatorTree::verifyDomTree() const { - if (!VerifyDomInfo) - return; - Function &F = *getRoot()->getParent(); DominatorTree OtherDT; @@ -350,7 +347,10 @@ return false; } -void DominatorTreeWrapperPass::verifyAnalysis() const { DT.verifyDomTree(); } +void DominatorTreeWrapperPass::verifyAnalysis() const { + if (VerifyDomInfo) + DT.verifyDomTree(); +} void DominatorTreeWrapperPass::print(raw_ostream &OS, const Module *) const { DT.print(OS); Index: lib/Transforms/Scalar/PlaceSafepoints.cpp =================================================================== --- lib/Transforms/Scalar/PlaceSafepoints.cpp +++ lib/Transforms/Scalar/PlaceSafepoints.cpp @@ -448,10 +448,9 @@ // Note: SplitBlock modifies the DT. Simply passing a Pass (which is a // module pass) is not enough. DT.recalculate(F); -#ifndef NDEBUG + // SplitBlock updates the DT - DT.verifyDomTree(); -#endif + DEBUG(DT.verifyDomTree()); return BB->getTerminator(); }