llvm-6502/lib/Transforms
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
..
Hello CMake: Support for building llvm loadable modules. 2009-11-10 02:45:37 +00:00
Instrumentation Cheap, mostly strict, stable sorting. 2009-12-02 15:57:15 +00:00
IPO Teach GlobalOpt to delete aliases with internal linkage (after 2009-12-08 10:10:20 +00:00
Scalar Revise scalar replacement to be more flexible about handle bitcasts and GEPs. 2009-12-11 23:47:40 +00:00
Utils Remove unnecessary #include "llvm/LLVMContext.h". 2009-12-08 05:45:41 +00:00
Makefile