1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/test/Transforms/JumpThreading
Sanjoy Das 812a2fc1c7 [JumpThreading] Thread through guards
Summary:
This patch allows JumpThreading also thread through guards.
Virtually, guard(cond) is equivalent to the following construction:

  if (cond) { do something } else {deoptimize}

Yet it is not explicitly converted into IFs before lowering.
This patch enables early threading through guards in simple cases.
Currently it covers the following situation:

  if (cond1) {
    // code A
  } else {
    // code B
  }
  // code C
  guard(cond2)
  // code D

If there is implication cond1 => cond2 or !cond1 => cond2, we can transform
this construction into the following:

  if (cond1) {
    // code A
    // code C
  } else {
    // code B
    // code C
    guard(cond2)
  }
  // code D

Thus, removing the guard from one of execution branches.

Patch by Max Kazantsev!

Reviewers: reames, apilipenko, igor-laevsky, anna, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 294617
2017-02-09 19:40:22 +00:00
..
2008-11-27-EntryMunge.ll
2010-08-26-and.ll
2011-04-02-SimplifyDeadBlock.ll
2011-04-14-InfLoop.ll
2012-07-19-NoSuccessorIndirectBr.ll
and-and-cond.ll
and-cond.ll
assume-edge-dom.ll Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
assume.ll Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
basic.ll
branch-no-const.ll
compare.ll
conservative-lvi.ll
crash.ll
degenerate-phi.ll
guards.ll [JumpThreading] Thread through guards 2017-02-09 19:40:22 +00:00
implied-cond.ll
indirectbr.ll
induction.ll
landing-pad.ll
lvi-load.ll
no-irreducible-loops.ll
or-undef.ll
phi-eq.ll
phi-known.ll
pr9331.ll
pr15851_hang.ll
pr22086.ll
pr26096.ll
pr27840.ll
select.ll
static-profile.ll
thread-cmp.ll
thread-loads.ll [JumpThread] Enhance finding partial redundant loads by continuing scanning single predecessor 2017-02-02 15:12:34 +00:00
update-edge-weight.ll