llvm/test/Transforms/LoopUnswitch
Sanjoy Das 075766d9d0 [LoopUnswitch] Unswitch on conditions feeding into guards
Summary:
This is a straightforward extension of what LoopUnswitch does to
branches to guards.  That is, we unswitch

```
for (;;) {
  ...
  guard(loop_invariant_cond);
  ...
}
```

into

```
if (loop_invariant_cond) {
  for (;;) {
    ...
    // There is no need to emit guard(true)
    ...
  }
} else {
  for (;;) {
    ...
    guard(false);
    // SimplifyCFG will clean this up by adding an
    // unreachable after the guard(false)
    ...
  }
}
```

Reviewers: majnemer

Subscribers: mcrosier, llvm-commits, mzolotukhin

Differential Revision: http://reviews.llvm.org/D21725

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 05:10:45 +00:00
..
2006-06-13-SingleEntryPHI.ll
2006-06-27-DeadSwitchCase.ll
2007-05-09-tl.ll
2007-05-09-Unreachable.ll
2007-07-12-ExitDomInfo.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2007-07-13-DomInfo.ll
2007-07-18-DomInfo.ll
2007-08-01-Dom.ll
2007-08-01-LCSSA.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2007-10-04-DomFrontier.ll
2008-06-02-DomInfo.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2008-06-17-DomFrontier.ll
2008-11-03-Invariant.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2010-11-18-LCSSA.ll
2011-06-02-CritSwitch.ll
2011-09-26-EHCrash.ll Remove the ScalarReplAggregates pass 2016-06-15 00:19:09 +00:00
2011-11-18-SimpleSwitch.ll Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
2011-11-18-TwoSwitches-Threshold.ll
2011-11-18-TwoSwitches.ll Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
2012-04-02-IndirectBr.ll
2012-04-30-LoopUnswitch-LPad-Crash.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2012-05-20-Phi.ll
2015-06-17-Metadata.ll [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops 2016-03-29 04:08:57 +00:00
2015-09-18-Addrspace.ll Remove handling of AddrSpaceCast in stripAndAccumulateInBoundsConstantOffsets 2015-09-23 19:48:43 +00:00
basictest.ll Teach LoopUnswitch not to perform non-trivial unswitching on loops containing convergent operations. 2015-10-09 18:40:20 +00:00
cleanuppad.ll [IR] Reformulate LLVM's EH funclet IR 2015-12-12 05:38:55 +00:00
cold-loop.ll [LoopUnswitch] Add block frequency analysis to recognize hot/cold regions 2015-09-29 05:03:32 +00:00
copy-metadata.ll [LoopUnswitch] Preserve make.implicit metadata for unswitched conditions 2015-08-05 21:13:26 +00:00
crash.ll
exponential-behavior.ll [LoopUnswitch] Avoid exponential behavior 2016-06-25 01:14:19 +00:00
guards.ll [LoopUnswitch] Unswitch on conditions feeding into guards 2016-06-26 05:10:45 +00:00
infinite-loop.ll [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops 2016-03-29 04:08:57 +00:00
LIV-loop-condtion.ll [LoopUnswitch] Code refactoring to separate trivial loop unswitch and non-trivial loop unswitch in processCurrentLoop() 2015-07-22 05:26:29 +00:00
msan.ll Add a missing test. 2016-06-14 21:24:13 +00:00
preserve-analyses.ll
trivial-unswitch.ll [LoopUnswitch] Improve loop unswitch pass to find trivial unswitch conditions more effectively 2015-07-25 03:21:06 +00:00