llvm-6502/lib/Transforms/Scalar
Philip Reames 6865b977ae [RewriteStatepointsForGC] Extend base pointer to handle more cases w/vectors
When relocating a pointer, we need to determine a base pointer for the derived pointer being relocated. We have limited support for handling a pointer extracted from a vector; the current code only handled the case where the entire vector was known to contain base pointers. This patch extends the reasoning to handle chains of insertelements where the indices are constants. This case turns out to be fairly common in vectorized code. We can now handle vectors which contains mixtures of base and derived pointers provided the insertelements use constant indices.

Note that this doesn't solve the general problem. To handle variable indexed insertelements, we'd need to scalarize and introduce conditional branching based on the index. Alternatively, we could eagerly scalarize, but the code structure doesn't currently make either fix easy. The patch also doesn't handle shufflevector or other vector manipulation for much the same reasons. I plan to defer this work until I have a motivating test case.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237200 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 22:19:52 +00:00
..
ADCE.cpp
AlignmentFromAssumptions.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
BDCE.cpp
CMakeLists.txt Simplify n-ary adds by reassociation 2015-04-14 04:59:22 +00:00
ConstantHoisting.cpp
ConstantProp.cpp
CorrelatedValuePropagation.cpp
DCE.cpp
DeadStoreElimination.cpp [CallSite] Make construction from Value* (or Instruction*) explicit. 2015-04-10 14:50:08 +00:00
EarlyCSE.cpp
FlattenCFGPass.cpp
Float2Int.cpp
GVN.cpp
InductiveRangeCheckElimination.cpp
IndVarSimplify.cpp [SCEV] Refactor out isHighCostExpansion. NFCI. 2015-04-14 03:20:28 +00:00
JumpThreading.cpp [JumpThreading] Simplify comparisons when simplifying branches 2015-05-07 00:19:14 +00:00
LICM.cpp Convert PHI getIncomingValue() to foreach over incoming_values(). NFC. 2015-05-12 20:05:31 +00:00
LLVMBuild.txt
LoadCombine.cpp Mark empty default constructors as =default if it makes the type POD 2015-04-11 18:57:14 +00:00
LoopDeletion.cpp
LoopIdiomRecognize.cpp [LoopIdiomRecognize] Transform backedge-taken count check into an assertion. 2015-05-11 21:02:34 +00:00
LoopInstSimplify.cpp
LoopInterchange.cpp Fix LoopInterchange/reductions.ll test for debug builds 2015-04-24 17:39:16 +00:00
LoopRerollPass.cpp
LoopRotation.cpp
LoopStrengthReduce.cpp [LSR][NFC] Remove a stale comment. 2015-04-21 20:42:50 +00:00
LoopUnrollPass.cpp Reimplement heuristic for estimating complete-unroll optimization effects. 2015-05-12 17:20:03 +00:00
LoopUnswitch.cpp
LowerAtomic.cpp
LowerExpectIntrinsic.cpp
Makefile
MemCpyOptimizer.cpp [MemCpyOpt] Look at any dependency -not just source- for memset+memcpy. 2015-05-11 23:09:46 +00:00
MergedLoadStoreMotion.cpp
NaryReassociate.cpp Resurrect r235688 2015-04-24 04:22:39 +00:00
PartiallyInlineLibCalls.cpp
PlaceSafepoints.cpp [PlaceSafepoints] Add missing "override" to PlaceBackedgeSafepointsImpl::runOnFunction 2015-05-12 21:49:47 +00:00
Reassociate.cpp don't repeat function names in comments; NFC 2015-04-22 18:04:46 +00:00
Reg2Mem.cpp
RewriteStatepointsForGC.cpp [RewriteStatepointsForGC] Extend base pointer to handle more cases w/vectors 2015-05-12 22:19:52 +00:00
SampleProfile.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
Scalar.cpp Simplify n-ary adds by reassociation 2015-04-14 04:59:22 +00:00
Scalarizer.cpp
ScalarReplAggregates.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
SCCP.cpp
SeparateConstOffsetFromGEP.cpp Fix comment for NoCommonBits. 2015-04-23 22:55:48 +00:00
SimplifyCFGPass.cpp
Sink.cpp
SROA.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
StraightLineStrengthReduce.cpp [SLSR] garbage-collect unused instructions 2015-04-21 19:56:18 +00:00
StructurizeCFG.cpp Change range-based for-loops to be -Wrange-loop-analysis clean. 2015-04-15 01:21:15 +00:00
TailRecursionElimination.cpp