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 Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombine [InstCombine] Generalize sub of selects optimization to all BinaryOperators 2015-07-14 22:39:23 +00:00
Instrumentation [asan] Improve moving of non-instrumented allocas 2015-07-22 10:25:38 +00:00
IPO [PM/AA] Remove the last of the legacy update API from AliasAnalysis as 2015-07-22 09:49:59 +00:00
ObjCARC Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Scalar [PM/AA] Remove all of the dead AliasAnalysis pointers being threaded 2015-07-22 09:52:54 +00:00
Utils Fix mem2reg to correctly handle allocas only used in a single block 2015-07-22 10:29:29 +00:00
Vectorize [PM/AA] Remove the last of the legacy update API from AliasAnalysis as 2015-07-22 09:49:59 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile