1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test/Transforms/GVN
David Majnemer bf189bdcd7 [IR] Reformulate LLVM's EH funclet IR
While we have successfully implemented a funclet-oriented EH scheme on
top of LLVM IR, our scheme has some notable deficiencies:
- catchendpad and cleanupendpad are necessary in the current design
  but they are difficult to explain to others, even to seasoned LLVM
  experts.
- catchendpad and cleanupendpad are optimization barriers.  They cannot
  be split and force all potentially throwing call-sites to be invokes.
  This has a noticable effect on the quality of our code generation.
- catchpad, while similar in some aspects to invoke, is fairly awkward.
  It is unsplittable, starts a funclet, and has control flow to other
  funclets.
- The nesting relationship between funclets is currently a property of
  control flow edges.  Because of this, we are forced to carefully
  analyze the flow graph to see if there might potentially exist illegal
  nesting among funclets.  While we have logic to clone funclets when
  they are illegally nested, it would be nicer if we had a
  representation which forbade them upfront.

Let's clean this up a bit by doing the following:
- Instead, make catchpad more like cleanuppad and landingpad: no control
  flow, just a bunch of simple operands;  catchpad would be splittable.
- Introduce catchswitch, a control flow instruction designed to model
  the constraints of funclet oriented EH.
- Make funclet scoping explicit by having funclet instructions consume
  the token produced by the funclet which contains them.
- Remove catchendpad and cleanupendpad.  Their presence can be inferred
  implicitly using coloring information.

N.B.  The state numbering code for the CLR has been updated but the
veracity of it's output cannot be spoken for.  An expert should take a
look to make sure the results are reasonable.

Reviewers: rnk, JosephTremoulet, andrew.w.kaylor

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

llvm-svn: 255422
2015-12-12 05:38:55 +00:00
..
2007-07-25-DominatedLoop.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-25-InfiniteLoop.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-25-Loop.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-25-NestedLoop.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-25-SinglePredecessor.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-26-InterlockingLoops.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-26-NonRedundant.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-26-PhiErasure.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-30-PredIDom.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-07-31-NoDomInherit.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2007-07-31-RedundantPhi.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-02-12-UndefLoad.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-02-13-NewPHI.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-07-02-Unreachable.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-12-09-SelfRemove.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-12-12-RLE-Crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-12-14-rle-reanalyze.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2008-12-15-CacheVisited.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-01-21-SortInvalidation.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-01-22-SortInvalidation.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-02-17-LoadPRECrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-03-10-PREOnVoid.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2009-06-17-InvalidPRE.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-07-13-MemDepSortFail.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-11-12-MemDepMallocBitCast.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2010-03-31-RedundantPHIs.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2010-05-08-OneBit.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2010-11-13-Simplify.ll
2011-04-27-phioperands.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2011-06-01-NonLocalMemdepMiscompile.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2011-07-07-MatchIntrinsicExtract.ll
2011-09-07-TypeIdFor.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2012-05-22-PreCrash.ll
assume-equal.ll inariant.group handling in GVN 2015-10-02 22:12:22 +00:00
atomic.ll MemoryDependenceAnalysis: Don't miscompile atomics 2015-03-21 06:19:17 +00:00
basic-undef-test.ll Update BasicAliasAnalysis to understand that nothing aliases with undef values. 2015-05-05 18:10:49 +00:00
basic.ll
bitcast-of-call.ll
br-identical.ll GVN: If a branch has two identical successors, we cannot declare either dead. 2015-06-25 18:32:02 +00:00
calloc-load-removal.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
calls-nonlocal.ll
calls-readonly.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
commute.ll
cond_br2.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
cond_br.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
condprop.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
crash-no-aa.ll [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
edge.ll only propagate equality comparisons of FP values that we are certain are non-zero 2015-02-25 22:46:08 +00:00
fpmath.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
funclet.ll [IR] Reformulate LLVM's EH funclet IR 2015-12-12 05:38:55 +00:00
invariant-load.ll [PRE] Preserve !invariant.load metadata 2015-11-17 00:15:09 +00:00
invariant.group.ll inariant.group handling in GVN 2015-10-02 22:12:22 +00:00
lifetime-simple.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
load-constant-mem.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
load-from-unreachable-predecessor.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
load-pre-align.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
load-pre-licm.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
load-pre-nonlocal.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
local-pre.ll
lpre-call-wrap-2.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
lpre-call-wrap.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
malloc-load-removal.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
MemdepMiscompile.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
no_speculative_loads_with_asan.ll Disable gvn non-local speculative loads under asan. 2015-11-18 20:43:00 +00:00
noalias.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
non-local-offset.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
nonescaping-malloc.ll Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
null-aliases-nothing.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
phi-translate-partial-alias.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
phi-translate.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
pr10820.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
pr12979.ll [GVN] Intersect the IR flags when CSE'ing two instructions 2015-06-24 21:52:25 +00:00
pr14166.ll [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
pr17732.ll Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
pr17852.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
pr24397.ll [PHITransAddr] Don't assume that instruction operands are translatable 2015-08-09 15:43:02 +00:00
pr24426.ll Preserve CFG in MergedLoadStoreMotion. This fixes PR24426. 2015-10-18 19:34:10 +00:00
pr25440.ll Fix bug 25440: GVN assertion after coercing loads 2015-11-19 02:45:18 +00:00
pre-basic-add.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
pre-compare.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
pre-gep-load.ll GVN: don't try to replace instruction with itself. 2015-10-23 20:30:02 +00:00
pre-load.ll [IR] Reformulate LLVM's EH funclet IR 2015-12-12 05:38:55 +00:00
pre-new-inst.ll GVN: tolerate an instruction being replaced without existing in the leaderboard 2015-07-14 21:03:18 +00:00
pre-no-cost-phi.ll Allow PRE to insert no-cost phi nodes 2015-02-03 20:37:08 +00:00
pre-single-pred.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
preserve-tbaa.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
range.ll [GVN] Make a test case more robust 2015-10-28 03:20:05 +00:00
readattrs.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
rle-must-alias.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
rle-no-phi-translate.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
rle-nonlocal.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
rle-phi-translate.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
rle-semidominated.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
rle.ll Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
tbaa.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
unreachable_block_infinite_loop.ll [PHITransAddr] Don't translate unreachable values 2015-06-01 00:15:08 +00:00
volatile.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00