diff --git a/clang/test/CodeGen/thinlto-distributed-newpm.ll b/clang/test/CodeGen/thinlto-distributed-newpm.ll --- a/clang/test/CodeGen/thinlto-distributed-newpm.ll +++ b/clang/test/CodeGen/thinlto-distributed-newpm.ll @@ -34,8 +34,8 @@ ; CHECK-O: Running pass: SimplifyCFGPass on main ; CHECK-O: Running analysis: TargetIRAnalysis on main ; CHECK-O: Running analysis: AssumptionAnalysis on main -; CHECK-O: Running pass: SROA on main ; CHECK-O: Running analysis: DominatorTreeAnalysis on main +; CHECK-O: Running pass: SROA on main ; CHECK-O: Running pass: EarlyCSEPass on main ; CHECK-O: Running analysis: TargetLibraryAnalysis on main ; CHECK-O: Running pass: LowerExpectIntrinsicPass on main diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp --- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp +++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp @@ -249,18 +249,8 @@ } bool DwarfEHPrepare::run() { - assert(((OptLevel == CodeGenOpt::None || !RequireAndPreserveDomTree) || - (DTU && - DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) && - "Original domtree is invalid?"); - bool Changed = InsertUnwindResumeCalls(); - assert(((OptLevel == CodeGenOpt::None || !RequireAndPreserveDomTree) || - (DTU && - DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) && - "Original domtree is invalid?"); - return Changed; } @@ -268,7 +258,7 @@ FunctionCallee &RewindFunction, Function &F, const TargetLowering &TLI, DominatorTree *DT, const TargetTransformInfo *TTI) { - DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager); + DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy); return DwarfEHPrepare(OptLevel, RewindFunction, F, TLI, DT ? &DTU : nullptr, TTI) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp b/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp --- a/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp @@ -371,7 +371,7 @@ } // FIXME: add PDT here once simplifycfg is ready. - DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager); + DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy); if (RequireAndPreserveDomTree) DTU.applyUpdates(Updates); Updates.clear(); diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp --- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -232,7 +232,7 @@ static bool simplifyFunctionCFGImpl(Function &F, const TargetTransformInfo &TTI, DominatorTree *DT, const SimplifyCFGOptions &Options) { - DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager); + DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy); bool EverChanged = removeUnreachableBlocks(F, DT ? &DTU : nullptr); EverChanged |= mergeEmptyReturnBlocks(F, DT ? &DTU : nullptr); @@ -260,16 +260,8 @@ static bool simplifyFunctionCFG(Function &F, const TargetTransformInfo &TTI, DominatorTree *DT, const SimplifyCFGOptions &Options) { - assert((!RequireAndPreserveDomTree || - (DT && DT->verify(DominatorTree::VerificationLevel::Full))) && - "Original domtree is invalid?"); - bool Changed = simplifyFunctionCFGImpl(F, TTI, DT, Options); - assert((!RequireAndPreserveDomTree || - (DT && DT->verify(DominatorTree::VerificationLevel::Full))) && - "Failed to maintain validity of domtree!"); - return Changed; } diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -91,7 +91,7 @@ cl::opt llvm::RequireAndPreserveDomTree( "simplifycfg-require-and-preserve-domtree", cl::Hidden, cl::ZeroOrMore, - cl::init(false), + cl::init(true), cl::desc("Temorary development switch used to gradually uplift SimplifyCFG " "into preserving DomTree,")); @@ -6703,20 +6703,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. diff --git a/llvm/test/CodeGen/AArch64/O3-pipeline.ll b/llvm/test/CodeGen/AArch64/O3-pipeline.ll --- a/llvm/test/CodeGen/AArch64/O3-pipeline.ll +++ b/llvm/test/CodeGen/AArch64/O3-pipeline.ll @@ -22,8 +22,8 @@ ; CHECK-NEXT: FunctionPass Manager ; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: FunctionPass Manager -; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Dominator Tree Construction +; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Lazy Branch Probability Analysis ; CHECK-NEXT: Lazy Block Frequency Analysis diff --git a/llvm/test/CodeGen/AMDGPU/opt-pipeline.ll b/llvm/test/CodeGen/AMDGPU/opt-pipeline.ll --- a/llvm/test/CodeGen/AMDGPU/opt-pipeline.ll +++ b/llvm/test/CodeGen/AMDGPU/opt-pipeline.ll @@ -43,8 +43,8 @@ ; GCN-O1-NEXT: Function Alias Analysis Results ; GCN-O1-NEXT: Simplify well-known AMD library calls ; GCN-O1-NEXT: Instrument function entry/exit with calls to e.g. mcount() (pre inlining) -; GCN-O1-NEXT: Simplify the CFG ; GCN-O1-NEXT: Dominator Tree Construction +; GCN-O1-NEXT: Simplify the CFG ; GCN-O1-NEXT: SROA ; GCN-O1-NEXT: Early CSE ; GCN-O1-NEXT: Lower 'expect' Intrinsics @@ -111,7 +111,6 @@ ; GCN-O1-NEXT: Memory SSA ; GCN-O1-NEXT: Early CSE w/ MemorySSA ; GCN-O1-NEXT: Simplify the CFG -; GCN-O1-NEXT: Dominator Tree Construction ; GCN-O1-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O1-NEXT: Function Alias Analysis Results ; GCN-O1-NEXT: Natural Loop Information @@ -130,7 +129,6 @@ ; GCN-O1-NEXT: PGOMemOPSize ; GCN-O1-NEXT: Simplify the CFG ; GCN-O1-NEXT: Reassociate expressions -; GCN-O1-NEXT: Dominator Tree Construction ; GCN-O1-NEXT: Natural Loop Information ; GCN-O1-NEXT: Canonicalize natural loops ; GCN-O1-NEXT: LCSSA Verifier @@ -150,7 +148,6 @@ ; GCN-O1-NEXT: Loop Pass Manager ; GCN-O1-NEXT: Unswitch loops ; GCN-O1-NEXT: Simplify the CFG -; GCN-O1-NEXT: Dominator Tree Construction ; GCN-O1-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O1-NEXT: Function Alias Analysis Results ; GCN-O1-NEXT: Natural Loop Information @@ -183,7 +180,6 @@ ; GCN-O1-NEXT: Post-Dominator Tree Construction ; GCN-O1-NEXT: Aggressive Dead Code Elimination ; GCN-O1-NEXT: Simplify the CFG -; GCN-O1-NEXT: Dominator Tree Construction ; GCN-O1-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O1-NEXT: Function Alias Analysis Results ; GCN-O1-NEXT: Natural Loop Information @@ -250,7 +246,6 @@ ; GCN-O1-NEXT: Optimization Remark Emitter ; GCN-O1-NEXT: Combine redundant instructions ; GCN-O1-NEXT: Simplify the CFG -; GCN-O1-NEXT: Dominator Tree Construction ; GCN-O1-NEXT: Optimize scalar/vector ops ; GCN-O1-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O1-NEXT: Function Alias Analysis Results @@ -354,8 +349,8 @@ ; GCN-O2-NEXT: Function Alias Analysis Results ; GCN-O2-NEXT: Simplify well-known AMD library calls ; GCN-O2-NEXT: Instrument function entry/exit with calls to e.g. mcount() (pre inlining) -; GCN-O2-NEXT: Simplify the CFG ; GCN-O2-NEXT: Dominator Tree Construction +; GCN-O2-NEXT: Simplify the CFG ; GCN-O2-NEXT: SROA ; GCN-O2-NEXT: Early CSE ; GCN-O2-NEXT: Lower 'expect' Intrinsics @@ -428,7 +423,6 @@ ; GCN-O2-NEXT: Jump Threading ; GCN-O2-NEXT: Value Propagation ; GCN-O2-NEXT: Simplify the CFG -; GCN-O2-NEXT: Dominator Tree Construction ; GCN-O2-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O2-NEXT: Function Alias Analysis Results ; GCN-O2-NEXT: Natural Loop Information @@ -454,7 +448,6 @@ ; GCN-O2-NEXT: Tail Call Elimination ; GCN-O2-NEXT: Simplify the CFG ; GCN-O2-NEXT: Reassociate expressions -; GCN-O2-NEXT: Dominator Tree Construction ; GCN-O2-NEXT: Natural Loop Information ; GCN-O2-NEXT: Canonicalize natural loops ; GCN-O2-NEXT: LCSSA Verifier @@ -474,7 +467,6 @@ ; GCN-O2-NEXT: Loop Pass Manager ; GCN-O2-NEXT: Unswitch loops ; GCN-O2-NEXT: Simplify the CFG -; GCN-O2-NEXT: Dominator Tree Construction ; GCN-O2-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O2-NEXT: Function Alias Analysis Results ; GCN-O2-NEXT: Natural Loop Information @@ -534,7 +526,6 @@ ; GCN-O2-NEXT: Loop Pass Manager ; GCN-O2-NEXT: Loop Invariant Code Motion ; GCN-O2-NEXT: Simplify the CFG -; GCN-O2-NEXT: Dominator Tree Construction ; GCN-O2-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O2-NEXT: Function Alias Analysis Results ; GCN-O2-NEXT: Natural Loop Information @@ -602,7 +593,6 @@ ; GCN-O2-NEXT: Optimization Remark Emitter ; GCN-O2-NEXT: Combine redundant instructions ; GCN-O2-NEXT: Simplify the CFG -; GCN-O2-NEXT: Dominator Tree Construction ; GCN-O2-NEXT: Natural Loop Information ; GCN-O2-NEXT: Scalar Evolution Analysis ; GCN-O2-NEXT: Basic Alias Analysis (stateless AA impl) @@ -713,8 +703,8 @@ ; GCN-O3-NEXT: Function Alias Analysis Results ; GCN-O3-NEXT: Simplify well-known AMD library calls ; GCN-O3-NEXT: Instrument function entry/exit with calls to e.g. mcount() (pre inlining) -; GCN-O3-NEXT: Simplify the CFG ; GCN-O3-NEXT: Dominator Tree Construction +; GCN-O3-NEXT: Simplify the CFG ; GCN-O3-NEXT: SROA ; GCN-O3-NEXT: Early CSE ; GCN-O3-NEXT: Lower 'expect' Intrinsics @@ -791,7 +781,6 @@ ; GCN-O3-NEXT: Jump Threading ; GCN-O3-NEXT: Value Propagation ; GCN-O3-NEXT: Simplify the CFG -; GCN-O3-NEXT: Dominator Tree Construction ; GCN-O3-NEXT: Combine pattern based expressions ; GCN-O3-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O3-NEXT: Function Alias Analysis Results @@ -818,7 +807,6 @@ ; GCN-O3-NEXT: Tail Call Elimination ; GCN-O3-NEXT: Simplify the CFG ; GCN-O3-NEXT: Reassociate expressions -; GCN-O3-NEXT: Dominator Tree Construction ; GCN-O3-NEXT: Natural Loop Information ; GCN-O3-NEXT: Canonicalize natural loops ; GCN-O3-NEXT: LCSSA Verifier @@ -838,7 +826,6 @@ ; GCN-O3-NEXT: Loop Pass Manager ; GCN-O3-NEXT: Unswitch loops ; GCN-O3-NEXT: Simplify the CFG -; GCN-O3-NEXT: Dominator Tree Construction ; GCN-O3-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O3-NEXT: Function Alias Analysis Results ; GCN-O3-NEXT: Natural Loop Information @@ -898,7 +885,6 @@ ; GCN-O3-NEXT: Loop Pass Manager ; GCN-O3-NEXT: Loop Invariant Code Motion ; GCN-O3-NEXT: Simplify the CFG -; GCN-O3-NEXT: Dominator Tree Construction ; GCN-O3-NEXT: Basic Alias Analysis (stateless AA impl) ; GCN-O3-NEXT: Function Alias Analysis Results ; GCN-O3-NEXT: Natural Loop Information @@ -966,7 +952,6 @@ ; GCN-O3-NEXT: Optimization Remark Emitter ; GCN-O3-NEXT: Combine redundant instructions ; GCN-O3-NEXT: Simplify the CFG -; GCN-O3-NEXT: Dominator Tree Construction ; GCN-O3-NEXT: Natural Loop Information ; GCN-O3-NEXT: Scalar Evolution Analysis ; GCN-O3-NEXT: Basic Alias Analysis (stateless AA impl) diff --git a/llvm/test/CodeGen/ARM/O3-pipeline.ll b/llvm/test/CodeGen/ARM/O3-pipeline.ll --- a/llvm/test/CodeGen/ARM/O3-pipeline.ll +++ b/llvm/test/CodeGen/ARM/O3-pipeline.ll @@ -6,8 +6,8 @@ ; CHECK-NEXT: Pre-ISel Intrinsic Lowering ; CHECK-NEXT: FunctionPass Manager ; CHECK-NEXT: Expand Atomic instructions -; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Dominator Tree Construction +; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: MVE gather/scatter lowering ; CHECK-NEXT: Module Verifier @@ -55,7 +55,6 @@ ; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Exception handling preparation ; CHECK-NEXT: Merge internal globals -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Scalar Evolution Analysis ; CHECK-NEXT: Lazy Branch Probability Analysis diff --git a/llvm/test/Other/new-pm-defaults.ll b/llvm/test/Other/new-pm-defaults.ll --- a/llvm/test/Other/new-pm-defaults.ll +++ b/llvm/test/Other/new-pm-defaults.ll @@ -81,8 +81,8 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis -; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis +; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass diff --git a/llvm/test/Other/new-pm-thinlto-defaults.ll b/llvm/test/Other/new-pm-thinlto-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-defaults.ll @@ -67,8 +67,8 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis -; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis +; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass diff --git a/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll @@ -37,8 +37,8 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis -; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis +; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass diff --git a/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll @@ -39,8 +39,8 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis -; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis +; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass diff --git a/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll @@ -38,8 +38,8 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis -; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis +; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass diff --git a/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll @@ -37,8 +37,8 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis -; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis +; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass diff --git a/llvm/test/Other/opt-LTO-pipeline.ll b/llvm/test/Other/opt-LTO-pipeline.ll --- a/llvm/test/Other/opt-LTO-pipeline.ll +++ b/llvm/test/Other/opt-LTO-pipeline.ll @@ -160,7 +160,6 @@ ; CHECK-NEXT: Combine redundant instructions ; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Sparse Conditional Constant Propagation -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -182,6 +181,7 @@ ; CHECK-NEXT: Lower type metadata ; CHECK-NEXT: Lower type metadata ; CHECK-NEXT: FunctionPass Manager +; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Eliminate Available Externally Globals ; CHECK-NEXT: Dead Global Elimination diff --git a/llvm/test/Other/opt-O2-pipeline.ll b/llvm/test/Other/opt-O2-pipeline.ll --- a/llvm/test/Other/opt-O2-pipeline.ll +++ b/llvm/test/Other/opt-O2-pipeline.ll @@ -13,8 +13,8 @@ ; CHECK-EXT: Good Bye World Pass ; CHECK-NOEXT-NOT: Good Bye World Pass ; CHECK-NEXT: Instrument function entry/exit with calls to e.g. mcount() (pre inlining) -; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Dominator Tree Construction +; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: SROA ; CHECK-NEXT: Early CSE ; CHECK-NEXT: Lower 'expect' Intrinsics @@ -75,7 +75,6 @@ ; CHECK-NEXT: Jump Threading ; CHECK-NEXT: Value Propagation ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -101,7 +100,6 @@ ; CHECK-NEXT: Tail Call Elimination ; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Reassociate expressions -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Canonicalize natural loops ; CHECK-NEXT: LCSSA Verifier @@ -118,7 +116,6 @@ ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Unswitch loops ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -178,7 +175,6 @@ ; CHECK-NEXT: Loop Pass Manager ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -246,7 +242,6 @@ ; CHECK-NEXT: Optimization Remark Emitter ; CHECK-NEXT: Combine redundant instructions ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Scalar Evolution Analysis ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) diff --git a/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll b/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll --- a/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll +++ b/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll @@ -13,8 +13,8 @@ ; CHECK-EXT: Good Bye World Pass ; CHECK-NOEXT-NOT: Good Bye World Pass ; CHECK-NEXT: Instrument function entry/exit with calls to e.g. mcount() (pre inlining) -; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Dominator Tree Construction +; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: SROA ; CHECK-NEXT: Early CSE ; CHECK-NEXT: Lower 'expect' Intrinsics @@ -79,7 +79,6 @@ ; CHECK-NEXT: Jump Threading ; CHECK-NEXT: Value Propagation ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Combine pattern based expressions ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results @@ -106,7 +105,6 @@ ; CHECK-NEXT: Tail Call Elimination ; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Reassociate expressions -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Canonicalize natural loops ; CHECK-NEXT: LCSSA Verifier @@ -123,7 +121,6 @@ ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Unswitch loops ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -183,7 +180,6 @@ ; CHECK-NEXT: Loop Pass Manager ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -258,7 +254,6 @@ ; CHECK-NEXT: Optimization Remark Emitter ; CHECK-NEXT: Combine redundant instructions ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Scalar Evolution Analysis ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) diff --git a/llvm/test/Other/opt-O3-pipeline.ll b/llvm/test/Other/opt-O3-pipeline.ll --- a/llvm/test/Other/opt-O3-pipeline.ll +++ b/llvm/test/Other/opt-O3-pipeline.ll @@ -13,8 +13,8 @@ ; CHECK-EXT: Good Bye World Pass ; CHECK-NOEXT-NOT: Good Bye World Pass ; CHECK-NEXT: Instrument function entry/exit with calls to e.g. mcount() (pre inlining) -; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Dominator Tree Construction +; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: SROA ; CHECK-NEXT: Early CSE ; CHECK-NEXT: Lower 'expect' Intrinsics @@ -79,7 +79,6 @@ ; CHECK-NEXT: Jump Threading ; CHECK-NEXT: Value Propagation ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Combine pattern based expressions ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results @@ -106,7 +105,6 @@ ; CHECK-NEXT: Tail Call Elimination ; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Reassociate expressions -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Canonicalize natural loops ; CHECK-NEXT: LCSSA Verifier @@ -123,7 +121,6 @@ ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Unswitch loops ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -183,7 +180,6 @@ ; CHECK-NEXT: Loop Pass Manager ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -251,7 +247,6 @@ ; CHECK-NEXT: Optimization Remark Emitter ; CHECK-NEXT: Combine redundant instructions ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Scalar Evolution Analysis ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) diff --git a/llvm/test/Other/opt-Os-pipeline.ll b/llvm/test/Other/opt-Os-pipeline.ll --- a/llvm/test/Other/opt-Os-pipeline.ll +++ b/llvm/test/Other/opt-Os-pipeline.ll @@ -13,8 +13,8 @@ ; CHECK-EXT: Good Bye World Pass ; CHECK-NOEXT-NOT: Good Bye World Pass ; CHECK-NEXT: Instrument function entry/exit with calls to e.g. mcount() (pre inlining) -; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Dominator Tree Construction +; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: SROA ; CHECK-NEXT: Early CSE ; CHECK-NEXT: Lower 'expect' Intrinsics @@ -75,7 +75,6 @@ ; CHECK-NEXT: Jump Threading ; CHECK-NEXT: Value Propagation ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -87,7 +86,6 @@ ; CHECK-NEXT: Tail Call Elimination ; CHECK-NEXT: Simplify the CFG ; CHECK-NEXT: Reassociate expressions -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Canonicalize natural loops ; CHECK-NEXT: LCSSA Verifier @@ -104,7 +102,6 @@ ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Unswitch loops ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -164,7 +161,6 @@ ; CHECK-NEXT: Loop Pass Manager ; CHECK-NEXT: Loop Invariant Code Motion ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-NEXT: Function Alias Analysis Results ; CHECK-NEXT: Natural Loop Information @@ -232,7 +228,6 @@ ; CHECK-NEXT: Optimization Remark Emitter ; CHECK-NEXT: Combine redundant instructions ; CHECK-NEXT: Simplify the CFG -; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Scalar Evolution Analysis ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) diff --git a/llvm/test/Other/pm-pgo-preinline.ll b/llvm/test/Other/pm-pgo-preinline.ll --- a/llvm/test/Other/pm-pgo-preinline.ll +++ b/llvm/test/Other/pm-pgo-preinline.ll @@ -10,7 +10,6 @@ ; CHECK-Osz-NEXT: SROA ; CHECK-Osz-NEXT: Early CSE ; CHECK-Osz-NEXT: Simplify the CFG -; CHECK-Osz-NEXT: Dominator Tree Construction ; CHECK-Osz-NEXT: Basic Alias Analysis (stateless AA impl) ; CHECK-Osz-NEXT: Function Alias Analysis Results ; CHECK-Osz-NEXT: Natural Loop Information