llvm-project/llvm/test/Transforms/LoopUnswitch
Chandler Carruth 4ab0f4910a [LoopSimplify] Factor the logic to form dedicated exits into a utility.
I want to use the same logic as LoopSimplify to form dedicated exits in
another pass (SimpleLoopUnswitch) so I wanted to factor it out here.

I also noticed that there is a pretty significantly more efficient way
to implement this than the way the code in LoopSimplify worked. We don't
need to actually retain the set of unique exit blocks, we can just
rewrite them as we find them and use only a set to deduplicate.

This did require changing one part of LoopSimplify to not re-use the
unique set of exits, but it only used it to check that there was
a single unique exit. That part of the code is about to walk the exiting
blocks anyways, so it seemed better to rewrite it to use those exiting
blocks to compute this property on-demand.

I also had to ditch a statistic, but it doesn't seem terribly valuable.

Differential Revision: https://reviews.llvm.org/D34049

llvm-svn: 306081
2017-06-23 04:03:04 +00:00
..
AMDGPU AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel 2017-03-21 21:39:51 +00:00
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 Revert "[SCEV] Enable SCEV verification by default in EXPENSIVE_CHECKS builds" 2017-04-24 02:35:19 +00:00
2010-11-18-LCSSA.ll
2011-06-02-CritSwitch.ll
2011-09-26-EHCrash.ll
2011-11-18-SimpleSwitch.ll [LoopSimplify] Factor the logic to form dedicated exits into a utility. 2017-06-23 04:03:04 +00:00
2011-11-18-TwoSwitches-Threshold.ll [LoopSimplify] Factor the logic to form dedicated exits into a utility. 2017-06-23 04:03:04 +00:00
2011-11-18-TwoSwitches.ll [LoopSimplify] Factor the logic to form dedicated exits into a utility. 2017-06-23 04:03:04 +00:00
2012-04-02-IndirectBr.ll
2012-04-30-LoopUnswitch-LPad-Crash.ll
2012-05-20-Phi.ll
2015-06-17-Metadata.ll
2015-09-18-Addrspace.ll
LIV-loop-condtion.ll
basictest.ll Fix a bug when unswitching on partial LIV for SwitchInst 2017-02-27 18:00:13 +00:00
cleanuppad.ll
copy-metadata.ll [LoopUnswitch] Fix a test case 2017-04-11 04:11:47 +00:00
crash.ll Remove unused arguments. NFCI 2017-03-19 15:31:16 +00:00
elseif-non-exponential-behavior.ll
exponential-behavior.ll
guards.ll
infinite-loop.ll
msan.ll
pr32818.ll [LoopUnswitch] Don't remove instructions with side effects. 2017-04-29 00:12:18 +00:00
preserve-analyses.ll
simplify-with-nonvalness.ll LoopUnswitch - Simplify based on known not to a be constant. 2017-02-23 23:42:19 +00:00
trivial-unswitch.ll