llvm-6502/lib/Transforms/Scalar
Chandler Carruth 50bc165c54 [SROA] Fix PR18615 with some long overdue simplifications to the bounds
checking in SROA.

The primary change is to just rely on uge for checking that the offset
is within the allocation size. This removes the explicit checks against
isNegative which were terribly error prone (including the reversed logic
that led to PR18615) and prevented us from supporting stack allocations
larger than half the address space.... Ok, so maybe the latter isn't
*common* but it's a silly restriction to have.

Also, we used to try to support a PHI node which loaded from before the
start of the allocation if any of the loaded bytes were within the
allocation. This doesn't make any sense, we have never really supported
loading or storing *before* the allocation starts. The simplified logic
just doesn't care.

We continue to allow loading past the end of the allocation in part to
support cases where there is a PHI and some loads are larger than others
and the larger ones reach past the end of the allocation. We could solve
this a different and more conservative way, but I'm still somewhat
paranoid about this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202224 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 03:14:14 +00:00
..
ADCE.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
CMakeLists.txt [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen. 2014-02-22 00:07:45 +00:00
ConstantHoisting.cpp Fix typos 2014-02-25 04:21:15 +00:00
ConstantProp.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
CorrelatedValuePropagation.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
DCE.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
DeadStoreElimination.cpp Factor out calls to AA.getDataLayout(). 2014-02-25 15:52:19 +00:00
EarlyCSE.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
FlattenCFGPass.cpp Factor FlattenCFG out from SimplifyCFG 2013-08-06 02:43:45 +00:00
GlobalMerge.cpp Rename many DataLayout variables from TD to DL. 2014-02-21 00:06:31 +00:00
GVN.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
IndVarSimplify.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
JumpThreading.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
LICM.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
LLVMBuild.txt Add proper dependencies to LLVMBuild.txt in llvm/lib. 2013-12-10 05:39:34 +00:00
LoopDeletion.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
LoopIdiomRecognize.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
LoopInstSimplify.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
LoopRerollPass.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
LoopRotation.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
LoopStrengthReduce.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
LoopUnrollPass.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
LoopUnswitch.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
LowerAtomic.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
Makefile
MemCpyOptimizer.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
PartiallyInlineLibCalls.cpp Turn MipsOptimizeMathLibCalls into a target-independent scalar transform 2013-08-23 10:27:02 +00:00
Reassociate.cpp [reassociate] Switch two std::sort calls into std::stable_sort calls as 2014-02-25 21:54:50 +00:00
Reg2Mem.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
SampleProfile.cpp Include <cctype> for isdigit(). 2014-02-22 06:34:10 +00:00
Scalar.cpp [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen. 2014-02-22 00:07:45 +00:00
Scalarizer.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
ScalarReplAggregates.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
SCCP.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
SimplifyCFGPass.cpp Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
Sink.cpp [PM] Split DominatorTree into a concrete analysis result object which 2014-01-13 13:07:17 +00:00
SROA.cpp [SROA] Fix PR18615 with some long overdue simplifications to the bounds 2014-02-26 03:14:14 +00:00
StructurizeCFG.cpp cleanup: scc_iterator consumers should use isAtEnd 2014-02-04 19:19:07 +00:00
TailRecursionElimination.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00