Changes in directory llvm/lib/VMCore:
Verifier.cpp updated: 1.137 -> 1.138 --- Log message: Convert the verifier over to use ETForest instead of DominatorSet. Patch by Daniel Berlin --- Diffs of the changes: (+14 -14) Verifier.cpp | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.137 llvm/lib/VMCore/Verifier.cpp:1.138 --- llvm/lib/VMCore/Verifier.cpp:1.137 Tue Jan 10 13:05:24 2006 +++ llvm/lib/VMCore/Verifier.cpp Thu Jan 12 00:17:59 2006 @@ -68,7 +68,7 @@ VerifierFailureAction action; // What to do if verification fails. Module *Mod; // Module we are verifying right now - DominatorSet *DS; // Dominator set, caution can be null! + ETForest *EF; // ET-Forest, caution can be null! std::stringstream msgs; // A stringstream to collect messages /// InstInThisBlock - when verifying a basic block, keep track of all of the @@ -79,17 +79,17 @@ Verifier() : Broken(false), RealPass(true), action(AbortProcessAction), - DS(0), msgs( std::ios::app | std::ios::out ) {} + EF(0), msgs( std::ios::app | std::ios::out ) {} Verifier( VerifierFailureAction ctn ) - : Broken(false), RealPass(true), action(ctn), DS(0), + : Broken(false), RealPass(true), action(ctn), EF(0), msgs( std::ios::app | std::ios::out ) {} Verifier(bool AB ) : Broken(false), RealPass(true), - action( AB ? AbortProcessAction : PrintMessageAction), DS(0), + action( AB ? AbortProcessAction : PrintMessageAction), EF(0), msgs( std::ios::app | std::ios::out ) {} - Verifier(DominatorSet &ds) + Verifier(ETForest &ef) : Broken(false), RealPass(false), action(PrintMessageAction), - DS(&ds), msgs( std::ios::app | std::ios::out ) {} + EF(&ef), msgs( std::ios::app | std::ios::out ) {} bool doInitialization(Module &M) { @@ -106,7 +106,7 @@ bool runOnFunction(Function &F) { // Get dominator information if we are being run by PassManager - if (RealPass) DS = &getAnalysis<DominatorSet>(); + if (RealPass) EF = &getAnalysis<ETForest>(); visit(F); InstsInThisBlock.clear(); @@ -139,7 +139,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); if (RealPass) - AU.addRequired<DominatorSet>(); + AU.addRequired<ETForest>(); } /// abortIfBroken - If the module is broken and we are supposed to abort on @@ -582,7 +582,7 @@ for (Value::use_iterator UI = I.use_begin(), UE = I.use_end(); UI != UE; ++UI) Assert1(*UI != (User*)&I || - !DS->dominates(&BB->getParent()->getEntryBlock(), BB), + !EF->dominates(&BB->getParent()->getEntryBlock(), BB), "Only PHI nodes may reference their own value!", &I); } @@ -633,20 +633,20 @@ // If they are in the same basic block, make sure that the definition // comes before the use. Assert2(InstsInThisBlock.count(Op) || - !DS->dominates(&BB->getParent()->getEntryBlock(), BB), + !EF->dominates(&BB->getParent()->getEntryBlock(), BB), "Instruction does not dominate all uses!", Op, &I); } // Definition must dominate use unless use is unreachable! - Assert2(DS->dominates(OpBlock, BB) || - !DS->dominates(&BB->getParent()->getEntryBlock(), BB), + Assert2(EF->dominates(OpBlock, BB) || + !EF->dominates(&BB->getParent()->getEntryBlock(), BB), "Instruction does not dominate all uses!", Op, &I); } else { // PHI nodes are more difficult than other nodes because they actually // "use" the value in the predecessor basic blocks they correspond to. BasicBlock *PredBB = cast<BasicBlock>(I.getOperand(i+1)); - Assert2(DS->dominates(OpBlock, PredBB) || - !DS->dominates(&BB->getParent()->getEntryBlock(), PredBB), + Assert2(EF->dominates(OpBlock, PredBB) || + !EF->dominates(&BB->getParent()->getEntryBlock(), PredBB), "Instruction does not dominate all uses!", Op, &I); } } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits