llvm-6502/lib/Transforms/Scalar
Bob Wilson 73a1b67cb9 Revise scalar replacement to be more flexible about handle bitcasts and GEPs.
While scanning through the uses of an alloca, keep track of the current offset
relative to the start of the alloca, and check memory references to see if
the offset & size correspond to a component within the alloca.  This has the
nice benefit of unifying much of the code from isSafeUseOfAllocation,
isSafeElementUse, and isSafeUseOfBitCastedAllocation.  The code to rewrite
the uses of a promoted alloca, after it is determined to be safe, is
reorganized in the same way.

Also, when rewriting GEP instructions, mark them as "in-bounds" since all the
indices are known to be safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 23:47:40 +00:00
..
ABCD.cpp
ADCE.cpp
BasicBlockPlacement.cpp
CMakeLists.txt
CodeGenPrepare.cpp Remove unnecessary #include "llvm/LLVMContext.h". 2009-12-08 05:45:41 +00:00
ConstantProp.cpp
DCE.cpp
DeadStoreElimination.cpp formatting cleanups. 2009-12-02 06:35:55 +00:00
GEPSplitter.cpp
GVN.cpp Fix PR5744, a case where we were getting the pointer size instead of the 2009-12-10 00:11:45 +00:00
IndVarSimplify.cpp
InstructionCombining.cpp Generalize this optimization to work on equality comparisons between any two 2009-12-05 05:00:00 +00:00
JumpThreading.cpp fix PR5698 2009-12-06 17:17:23 +00:00
LICM.cpp Make sure the immediate dominator isn't NULL through iterations 2009-12-10 00:25:41 +00:00
LoopDeletion.cpp
LoopIndexSplit.cpp
LoopRotation.cpp
LoopStrengthReduce.cpp
LoopUnrollPass.cpp
LoopUnswitch.cpp Dereference loopHeader after checking for null rather than before. 2009-12-09 22:55:01 +00:00
Makefile
MemCpyOptimizer.cpp
Reassociate.cpp
Reg2Mem.cpp
Scalar.cpp
ScalarReplAggregates.cpp Revise scalar replacement to be more flexible about handle bitcasts and GEPs. 2009-12-11 23:47:40 +00:00
SCCP.cpp
SCCVN.cpp Remove unnecessary #include "llvm/LLVMContext.h". 2009-12-08 05:45:41 +00:00
SimplifyCFGPass.cpp
SimplifyHalfPowrLibCalls.cpp improve portability to avoid conflicting with std::next in c++'0x. 2009-12-03 00:50:42 +00:00
SimplifyLibCalls.cpp tidy up, remove dependence on order of evaluation of function args from EmitMemCpy. 2009-12-02 06:05:42 +00:00
TailDuplication.cpp
TailRecursionElimination.cpp