This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8cfa963463d0: [SimplifyCFG] If provided, preserve Dominator Tree (authored by lebedev.ri).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94827/new/ https://reviews.llvm.org/D94827 Files: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp =================================================================== --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -6561,20 +6561,10 @@ bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) { bool Changed = simplifyOnceImpl(BB); - assert((!RequireAndPreserveDomTree || - (DTU && - DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) && - "Failed to maintain validity of domtree!"); - return Changed; } bool SimplifyCFGOpt::run(BasicBlock *BB) { - assert((!RequireAndPreserveDomTree || - (DTU && - DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) && - "Original domtree is invalid?"); - bool Changed = false; // Repeated simplify BB as long as resimplification is requested. @@ -6592,7 +6582,7 @@ bool llvm::simplifyCFG(BasicBlock *BB, const TargetTransformInfo &TTI, DomTreeUpdater *DTU, const SimplifyCFGOptions &Options, ArrayRef<WeakVH> LoopHeaders) { - return SimplifyCFGOpt(TTI, RequireAndPreserveDomTree ? DTU : nullptr, - BB->getModule()->getDataLayout(), LoopHeaders, Options) + return SimplifyCFGOpt(TTI, DTU, BB->getModule()->getDataLayout(), LoopHeaders, + Options) .run(BB); }
Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp =================================================================== --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -6561,20 +6561,10 @@ bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) { bool Changed = simplifyOnceImpl(BB); - assert((!RequireAndPreserveDomTree || - (DTU && - DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) && - "Failed to maintain validity of domtree!"); - return Changed; } bool SimplifyCFGOpt::run(BasicBlock *BB) { - assert((!RequireAndPreserveDomTree || - (DTU && - DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) && - "Original domtree is invalid?"); - bool Changed = false; // Repeated simplify BB as long as resimplification is requested. @@ -6592,7 +6582,7 @@ bool llvm::simplifyCFG(BasicBlock *BB, const TargetTransformInfo &TTI, DomTreeUpdater *DTU, const SimplifyCFGOptions &Options, ArrayRef<WeakVH> LoopHeaders) { - return SimplifyCFGOpt(TTI, RequireAndPreserveDomTree ? DTU : nullptr, - BB->getModule()->getDataLayout(), LoopHeaders, Options) + return SimplifyCFGOpt(TTI, DTU, BB->getModule()->getDataLayout(), LoopHeaders, + Options) .run(BB); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits