llvm-6502/lib/Transforms
Michael Kuperstein 6418278e7d Fix mem2reg to correctly handle allocas only used in a single block
Currently, a load from an alloca that is used in as single block and is not preceded
by a store is replaced by undef. This is not always correct if the single block is
inside a loop.
Fix the logic so that:
1) If there are no stores in the block, replace the load with an undef, as before.
2) If there is a store (regardless of where it is in the block w.r.t the load), bail
out, and let the rest of mem2reg handle this alloca.

Patch by: gil.rapaport@intel.com
Differential Revision: http://reviews.llvm.org/D11355

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242884 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 10:29:29 +00:00
..
Hello
InstCombine
Instrumentation [asan] Improve moving of non-instrumented allocas 2015-07-22 10:25:38 +00:00
IPO
ObjCARC
Scalar
Utils Fix mem2reg to correctly handle allocas only used in a single block 2015-07-22 10:29:29 +00:00
Vectorize
CMakeLists.txt
LLVMBuild.txt
Makefile