llvm-6502/test/Transforms
Philip Reames 9f3ecd086a [RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instructions
RewriteStatepointsForGC pass emits an alloca for each GC pointer which will be relocated. It then inserts stores after def and all relocations, and inserts loads before each use as well. In the end, mem2reg is used to update IR with relocations in SSA form.

However, there is a problem with inserting stores for values defined by invoke instructions. The code didn't expect a def was a terminator instruction, and inserting instructions after these terminators resulted in malformed IR.

This patch fixes this problem by handling invoke instructions as a special case. If the def is an invoke instruction, the store will be inserted at the beginning of the normal destination block. Since return value from invoke instruction does not dominate the unwind destination block, no action is needed there.

Patch by: Chen Li
Differential Revision: http://reviews.llvm.org/D7923




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231183 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-04 00:13:52 +00:00
..
ADCE [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
AddDiscriminators DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
AlignmentFromAssumptions [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ArgumentPromotion DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
AtomicExpand/ARM
BBVectorize [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
BDCE [BDCE] Don't forget uses of root instructions seen before the instruction itself 2015-02-18 03:12:28 +00:00
BranchFolding
CodeExtractor [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
CodeGenPrepare [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ConstantHoisting [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ConstantMerge
ConstProp [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
CorrelatedValuePropagation [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
DeadArgElim DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
DeadStoreElimination DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
EarlyCSE [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
FunctionAttrs [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
GCOVProfiling DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
GlobalDCE [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
GlobalOpt DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
GVN [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
IndVarSimplify Revert some changes that were made to fix PR20680. 2015-03-02 21:41:07 +00:00
Inline DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
InstCombine InstCombine: Ensure select condition types are identical before merging 2015-03-03 22:40:36 +00:00
InstMerge [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
InstSimplify [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Internalize [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
IPConstantProp [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
IRCE [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
JumpThreading [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LCSSA [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LICM DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
LoadCombine [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopDeletion [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopIdiom DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
LoopReroll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopRotate DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
LoopSimplify [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopStrengthReduce DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
LoopUnroll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopUnswitch [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopVectorize DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
LowerAtomic [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LowerBitSets LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets. 2015-03-03 00:49:28 +00:00
LowerExpectIntrinsic [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LowerInvoke
LowerSwitch [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Mem2Reg DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
MemCpyOpt [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
MergeFunc [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
MetaRenamer [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ObjCARC DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
PartiallyInlineLibCalls
PhaseOrdering [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
PlaceSafepoints PlaceSafepoints: use IRBuilder helpers 2015-02-26 00:35:56 +00:00
PruneEH
Reassociate [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Reg2Mem
RewriteStatepointsForGC [RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instructions 2015-03-04 00:13:52 +00:00
SampleProfile DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
Scalarizer DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
ScalarRepl DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
SCCP [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
SeparateConstOffsetFromGEP/NVPTX [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
SimplifyCFG DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
Sink [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
SLPVectorizer DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
SROA [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
StraightLineStrengthReduce
StripSymbols DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
StructurizeCFG [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
TailCallElim TRE: Just erase dead BBs and tweak the iteration loop not to increment the deleted BB iterator. 2015-02-28 16:47:27 +00:00
TailDup
Util