Check alignment of loads when deciding whether it is safe to execute them

unconditionally.  Besides checking the offset, also check that the underlying
object is aligned as much as the load itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bob Wilson
2010-01-30 04:42:39 +00:00
parent a6bff982c1
commit 49db68fba0
6 changed files with 70 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ template<typename T> class SmallVectorImpl;
/// specified pointer, we do a quick local scan of the basic block containing
/// ScanFrom, to determine if the address is already accessed.
bool isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom,
const TargetData *TD = 0);
unsigned Align, const TargetData *TD = 0);
//===----------------------------------------------------------------------===//
// Local constant propagation.