Commit
e08fea3b240994572a4dd6b34bd846aef023a123
by lebedev.ri[SimplifyCFGPass] Ensure that DominatorTreeWrapperPass is init'd before SimplifyCFG
It's probably better than hoping that it will happen to be already initialized.
|
 | llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp |
Commit
f1ce6960561bc28129fa3306f57a5c6df21258ab
by lebedev.ri[SimplifyCFG] Teach tryWidenCondBranchToCondBranch() to preserve DomTree
|
 | llvm/test/Transforms/SimplifyCFG/wc-widen-block.ll |
 | llvm/lib/Transforms/Utils/SimplifyCFG.cpp |
Commit
657c1e09da9fb5e63b963fe8eeace01e42e7d3ba
by lebedev.ri[SimplifyCFG] Teach eliminateDeadSwitchCases() to preserve DomTree, part 2
|
 | llvm/lib/Transforms/Utils/SimplifyCFG.cpp |
 | llvm/test/Transforms/SimplifyCFG/switch-dead-default.ll |
Commit
db753269d912936d9ab27018faf867afce4b16de
by lebedev.ri[IR] PassManagerTest: Register DominatorTreeAnalysis before running SimplifyCFGPass
Otherwise these particular tests fail when SimplifyCFG requires DomTree
|
 | llvm/unittests/IR/PassManagerTest.cpp |
Commit
5fe0798dee6e2093aad7be11956c2bcaaf61dc8c
by lebedev.ri[Utils] LocalTest: fix SimplifyCFGWithNullAC test to work with `-simplifycfg-require-and-preserve-domtree=1`
|
 | llvm/unittests/Transforms/Utils/LocalTest.cpp |
Commit
c38739ad8f10beb3144abcfebdcf50547328d346
by lebedev.ri[NFC] clang-format the entire DwarfEHPrepare.cpp
|
 | llvm/lib/CodeGen/DwarfEHPrepare.cpp |
Commit
e6b1a27fb9c71a9a81439917368a25ddc7d371a9
by lebedev.ri[NFC][CodeGen] Split DwarfEHPrepare pass into an actual transform and an legacy-PM wrapper
This is consistent with the layout of other passes, and simplifies further refinements regarding DomTree handling.
This is indended to be a NFC commit.
|
 | llvm/include/llvm/InitializePasses.h |
 | llvm/tools/opt/opt.cpp |
 | llvm/lib/CodeGen/DwarfEHPrepare.cpp |
 | llvm/lib/CodeGen/CodeGen.cpp |
Commit
b23b1bcc26e775a4998a78b6fe256e8cb0e3e0d3
by lebedev.ri[NFC][CodeGen][Tests] Mark all tests that fail to preserve DomTree for SimplifyCFG as such
These tests start to fail when the SimplifyCFG's default regarding DomTree updating is switched on, so mark them as needing changes.
|
 | llvm/test/CodeGen/AMDGPU/wave32.ll |
 | llvm/test/CodeGen/SPARC/exception.ll |
 | llvm/test/CodeGen/AMDGPU/branch-relaxation.ll |
 | llvm/test/CodeGen/PowerPC/aix-exception.ll |
 | llvm/test/CodeGen/AMDGPU/unigine-liveness-crash.ll |
 | llvm/test/CodeGen/Hexagon/cfi_offset.ll |
 | llvm/test/CodeGen/AMDGPU/ret_jump.ll |
 | llvm/test/CodeGen/Hexagon/misaligned_double_vector_store_not_fast.ll |
 | llvm/test/CodeGen/ARM/ehabi-filters.ll |
 | llvm/test/CodeGen/Hexagon/swp-epilog-phi10.ll |
 | llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll |
 | llvm/test/CodeGen/X86/basic-block-sections-eh.ll |
 | llvm/test/CodeGen/X86/code-model-kernel.ll |
 | llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll |
 | llvm/test/CodeGen/ARM/global-merge.ll |
 | llvm/test/CodeGen/AMDGPU/si-annotate-cf-noloop.ll |
 | llvm/test/CodeGen/Hexagon/swp-reuse-phi-4.ll |
 | llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll |
 | llvm/test/CodeGen/AMDGPU/si-lower-control-flow-unreachable-block.ll |
 | llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll |
 | llvm/test/CodeGen/X86/gcc_except_table-multi.ll |
 | llvm/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll |
 | llvm/test/CodeGen/X86/2007-05-05-Personality.ll |
 | llvm/test/CodeGen/ARM/arm-ttype-target2.ll |
 | llvm/test/CodeGen/AArch64/pic-eh-stubs.ll |
 | llvm/test/CodeGen/ARM/dwarf-eh.ll |
 | llvm/test/CodeGen/AMDGPU/skip-if-dead.ll |
 | llvm/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll |
 | llvm/test/CodeGen/AMDGPU/mixed-wave32-wave64.ll |
 | llvm/test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll |
 | llvm/test/CodeGen/AMDGPU/valu-i1.ll |
 | llvm/test/CodeGen/X86/2010-08-04-MingWCrash.ll |
 | llvm/test/CodeGen/AMDGPU/unstructured-cfg-def-use-issue.ll |
 | llvm/test/CodeGen/X86/dwarf-eh-prepare.ll |
 | llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll |
 | llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll |
 | llvm/test/CodeGen/Hexagon/ehabi.ll |
 | llvm/test/CodeGen/ARM/setjmp_longjmp.ll |
 | llvm/test/CodeGen/Hexagon/packetize-allocframe.ll |
 | llvm/test/CodeGen/AMDGPU/update-phi.ll |
 | llvm/test/CodeGen/AMDGPU/infinite-loop.ll |
 | llvm/test/CodeGen/Hexagon/swp-order-deps3.ll |
 | llvm/test/CodeGen/AMDGPU/branch-condition-and.ll |
Commit
2461cdb41724298591133c811df82b0064adfa6b
by lebedev.ri[CodeGen][SimplifyCFG] Teach DwarfEHPrepare to preserve DomTree
Once the default for SimplifyCFG flips, we can no longer pass nullptr instead of DomTree to SimplifyCFG, so we need to propagate it here.
We don't strictly need to actually preserve DomTree in DwarfEHPrepare, but we might as well do it, since it's trivial.
|
 | llvm/test/CodeGen/Hexagon/cfi_offset.ll |
 | llvm/test/CodeGen/X86/gcc_except_table-multi.ll |
 | llvm/test/CodeGen/ARM/dwarf-eh.ll |
 | llvm/lib/CodeGen/DwarfEHPrepare.cpp |
 | llvm/test/CodeGen/ARM/setjmp_longjmp.ll |
 | llvm/test/CodeGen/X86/2007-05-05-Personality.ll |
 | llvm/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll |
 | llvm/test/CodeGen/ARM/arm-ttype-target2.ll |
 | llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll |
 | llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll |
 | llvm/test/CodeGen/SPARC/exception.ll |
 | llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll |
 | llvm/test/CodeGen/AArch64/pic-eh-stubs.ll |
 | llvm/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll |
 | llvm/test/CodeGen/X86/code-model-kernel.ll |
 | llvm/test/CodeGen/ARM/ehabi-filters.ll |
 | llvm/test/CodeGen/X86/2010-08-04-MingWCrash.ll |
 | llvm/test/CodeGen/ARM/global-merge.ll |
 | llvm/test/CodeGen/Hexagon/ehabi.ll |
 | llvm/test/CodeGen/Hexagon/packetize-allocframe.ll |
 | llvm/test/CodeGen/X86/basic-block-sections-eh.ll |
 | llvm/test/CodeGen/X86/dwarf-eh-prepare.ll |
 | llvm/test/CodeGen/PowerPC/aix-exception.ll |
Commit
b4429f3cdd1a8511bd014877b22d9679c4a74dbd
by lebedev.ri[SimplifyCFG] Teach removeUndefIntroducingPredecessor to preserve DomTree
|
 | llvm/test/CodeGen/Hexagon/swp-reuse-phi-4.ll |
 | llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll |
 | llvm/test/CodeGen/Hexagon/swp-epilog-phi10.ll |
 | llvm/test/CodeGen/Hexagon/swp-order-deps3.ll |
 | llvm/lib/Transforms/Utils/SimplifyCFG.cpp |
 | llvm/test/CodeGen/Hexagon/misaligned_double_vector_store_not_fast.ll |
Commit
4b80647367950ba3da6a08260487fd0dbc50a9c5
by lebedev.ri[AMDGPU][SimplifyCFG] Teach AMDGPUUnifyDivergentExitNodes to preserve {,Post}DomTree
This is a (last big?) part of the patch series to make SimplifyCFG preserve DomTree. Currently, it still does not actually preserve it, even thought it is pretty much fully updated to preserve it.
Once the default is flipped, a valid DomTree must be passed into simplifyCFG, which means that whatever pass calls simplifyCFG, should also be smart about DomTree's.
As far as i can see from `check-llvm` with default flipped, this is the last LLVM test batch (other than bugpoint tests) that needed fixes to not break with default flipped.
The changes here are boringly identical to the ones i did over 42+ times/commits recently already, so while AMDGPU is outside of my normal ecosystem, i'm going to go for post-commit review here, like in all the other 42+ changes.
Note that while the pass is taught to preserve {,Post}DomTree, it still doesn't do that by default, because simplifycfg still doesn't do that by default, and flipping default in this pass will implicitly flip the default for simplifycfg. That will happen, but not right now.
|
 | llvm/test/CodeGen/AMDGPU/branch-condition-and.ll |
 | llvm/test/CodeGen/AMDGPU/update-phi.ll |
 | llvm/test/CodeGen/AMDGPU/infinite-loop.ll |
 | llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll |
 | llvm/test/CodeGen/AMDGPU/si-lower-control-flow-unreachable-block.ll |
 | llvm/test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll |
 | llvm/test/CodeGen/AMDGPU/branch-relaxation.ll |
 | llvm/test/CodeGen/AMDGPU/ret_jump.ll |
 | llvm/test/CodeGen/AMDGPU/valu-i1.ll |
 | llvm/test/CodeGen/AMDGPU/si-annotate-cf-noloop.ll |
 | llvm/test/CodeGen/AMDGPU/mixed-wave32-wave64.ll |
 | llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp |
 | llvm/test/CodeGen/AMDGPU/wave32.ll |
 | llvm/test/CodeGen/AMDGPU/skip-if-dead.ll |
 | llvm/test/CodeGen/AMDGPU/unstructured-cfg-def-use-issue.ll |
 | llvm/test/CodeGen/AMDGPU/unigine-liveness-crash.ll |
 | llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll |