1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/lib/Transforms/Scalar
Philip Reames 59aed68d01 [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

llvm-svn: 231183
2015-03-04 00:13:52 +00:00
..
ADCE.cpp [ADCE] Don't indent inside an anonymous namespace 2015-02-16 18:08:00 +00:00
AlignmentFromAssumptions.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
BDCE.cpp add newline for easier reading; NFC 2015-02-23 21:32:09 +00:00
CMakeLists.txt Add a pass for constructing gc.statepoint sequences w/explicit relocations 2015-02-20 01:06:44 +00:00
ConstantHoisting.cpp [optnone] Skip pass Constant Hoisting on optnone functions. 2015-02-14 15:11:48 +00:00
ConstantProp.cpp [PM] Separate the TargetLibraryInfo object from the immutable pass. 2015-01-15 10:41:28 +00:00
CorrelatedValuePropagation.cpp
DCE.cpp [PM] Separate the TargetLibraryInfo object from the immutable pass. 2015-01-15 10:41:28 +00:00
DeadStoreElimination.cpp [PM] Move TargetLibraryInfo into the Analysis library. 2015-01-15 02:16:27 +00:00
EarlyCSE.cpp Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
FlattenCFGPass.cpp
GVN.cpp only propagate equality comparisons of FP values that we are certain are non-zero 2015-02-25 22:46:08 +00:00
InductiveRangeCheckElimination.cpp IRCE: only touch loops that have been shown to have a high 2015-02-26 08:56:04 +00:00
IndVarSimplify.cpp Revert some changes that were made to fix PR20680. 2015-03-02 21:41:07 +00:00
JumpThreading.cpp [PM] Replace the Pass argument to SplitEdge with specific analyses used 2015-01-19 12:36:53 +00:00
LICM.cpp [LICM] Refactor to expose functionality as utility functions 2015-02-22 18:35:32 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
LoadCombine.cpp Use AA in LoadCombine 2014-11-03 23:19:16 +00:00
LoopDeletion.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
LoopIdiomRecognize.cpp LoopIdiom: Give globals for memset_pattern16 private linkage. 2015-03-03 00:17:09 +00:00
LoopInstSimplify.cpp [LPM] Stop using the string based preservation API. It is an 2015-01-28 04:57:56 +00:00
LoopRerollPass.cpp [LoopReroll] Relax some assumptions a little. 2015-02-16 17:02:00 +00:00
LoopRotation.cpp LoopRotate: When reconstructing loop simplify form don't split edges from indirectbrs. 2015-02-20 20:49:25 +00:00
LoopStrengthReduce.cpp LSR: Move set instead of copying. NFC. 2015-02-19 17:19:43 +00:00
LoopUnrollPass.cpp Transforms: Canonicalize access to function attributes, NFC 2015-02-14 01:11:29 +00:00
LoopUnswitch.cpp Transforms: Canonicalize access to function attributes, NFC 2015-02-14 01:11:29 +00:00
LowerAtomic.cpp
LowerExpectIntrinsic.cpp [PM] Port LowerExpectIntrinsic to the new pass manager. 2015-01-24 11:13:02 +00:00
Makefile
MemCpyOptimizer.cpp Properly update AA metadata when performing call slot optimization 2015-02-07 17:54:36 +00:00
MergedLoadStoreMotion.cpp Fixed a bug in store sinking. 2015-02-17 13:10:05 +00:00
PartiallyInlineLibCalls.cpp [multiversion] Thread a function argument through all the callers of the 2015-02-01 12:01:35 +00:00
PlaceSafepoints.cpp PlaceSafepoints: use IRBuilder helpers 2015-02-26 00:35:56 +00:00
Reassociate.cpp Reassociate: cannot negate a INT_MIN value 2015-02-11 19:54:44 +00:00
Reg2Mem.cpp Standardize {pred,succ,use,user}_empty() 2015-01-13 03:46:47 +00:00
RewriteStatepointsForGC.cpp [RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instructions 2015-03-04 00:13:52 +00:00
SampleProfile.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
Scalar.cpp Add a pass for constructing gc.statepoint sequences w/explicit relocations 2015-02-20 01:06:44 +00:00
Scalarizer.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
ScalarReplAggregates.cpp [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
SCCP.cpp [PM] Separate the TargetLibraryInfo object from the immutable pass. 2015-01-15 10:41:28 +00:00
SeparateConstOffsetFromGEP.cpp [multiversion] Thread a function argument through all the callers of the 2015-02-01 12:01:35 +00:00
SimplifyCFGPass.cpp [multiversion] Thread a function argument through all the callers of the 2015-02-01 12:01:35 +00:00
Sink.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
SROA.cpp Replace std::copy with a back inserter with vector append where feasible 2015-02-28 10:11:12 +00:00
StraightLineStrengthReduce.cpp Fixing a -Wsign-compare warning; NFC 2015-02-04 14:01:08 +00:00
StructurizeCFG.cpp StructurizeCFG: Remove obsolete fix for loop backedge detection 2015-02-04 20:49:47 +00:00
TailRecursionElimination.cpp 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