llvm-project/llvm/test/Transforms/LoopUnswitch
Florian Hahn b8c81fa5c7
[LoopUnswitch] Add shortcut if unswitched path is a no-op.
If we determine that the invariant path through the loop has no effects,
we can directly branch to the exit block, instead to unswitching first.

Besides avoiding some extra work (unswitching first, then deleting the
loop again) this allows to be more aggressive than regular unswitching
with respect to cost-modeling. This approach should always be be
desirable.

This is similar in spirit to D93734, just that it uses the previously
added checks for loop-unswitching.

I tried to add the required no-op checks from scratch, as we only check
a subset of the loop. There is potential to unify the checks with
LoopDeletion, at the cost of adding a predicate whether a block should
be considered.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95468
2021-02-01 09:03:30 +00:00
..
AMDGPU [AMDGPU] pin lit test divergent-unswitch.ll to the old pass manager 2021-01-20 22:02:09 +05:30
2006-06-13-SingleEntryPHI.ll
2006-06-27-DeadSwitchCase.ll
2007-05-09-Unreachable.ll
2007-05-09-tl.ll
2007-07-12-ExitDomInfo.ll
2007-07-13-DomInfo.ll
2007-07-18-DomInfo.ll
2007-08-01-Dom.ll
2007-08-01-LCSSA.ll
2007-10-04-DomFrontier.ll
2008-06-02-DomInfo.ll
2008-06-17-DomFrontier.ll
2008-11-03-Invariant.ll
2010-11-18-LCSSA.ll
2011-06-02-CritSwitch.ll
2011-09-26-EHCrash.ll
2011-11-18-SimpleSwitch.ll Ensure SplitEdge to return the new block between the two given blocks 2020-12-18 17:37:17 +00:00
2011-11-18-TwoSwitches-Threshold.ll
2011-11-18-TwoSwitches.ll
2012-04-02-IndirectBr.ll
2012-04-30-LoopUnswitch-LPad-Crash.ll
2012-05-20-Phi.ll
2015-06-17-Metadata.ll [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
2015-09-18-Addrspace.ll
LIV-loop-condtion.ll
basictest.ll
callbr.ll
cleanuppad.ll
convergent-hoist-modified.ll
copy-metadata.ll
crash.ll
elseif-non-exponential-behavior.ll
exponential-behavior.ll
guards.ll
infinite-loop.ll [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
invalidate-scev.ll
invoke-hoist-modified.ll
msan.ll
optsize-hoist-modified.ll
partial-unswitch-cost.ll [LoopUnswitch] Add shortcut if unswitched path is a no-op. 2021-02-01 09:03:30 +00:00
partial-unswitch-mssa-threshold.ll [LoopUnswitch] Implement first version of partial unswitching. 2021-01-21 09:46:41 +00:00
partial-unswitch-update-memoryssa.ll [LoopUnswitch] Properly update MSSA if header has non-clobbering stores. 2021-01-30 13:51:05 +00:00
partial-unswitch.ll [LoopUnswitch] Properly update MSSA if header has non-clobbering stores. 2021-01-30 13:51:05 +00:00
pr32818.ll
preserve-analyses.ll
simplify-with-nonvalness.ll
trivial-unswitch.ll
unswitch-equality-undef.ll
unswitch-select.ll