mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout is not available and behave conservatively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174024 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,8 +57,7 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom,
|
||||
unsigned Align, const DataLayout *TD) {
|
||||
int64_t ByteOffset = 0;
|
||||
Value *Base = V;
|
||||
if (TD)
|
||||
Base = GetPointerBaseWithConstantOffset(V, ByteOffset, *TD);
|
||||
Base = GetPointerBaseWithConstantOffset(V, ByteOffset, TD);
|
||||
|
||||
if (ByteOffset < 0) // out of bounds
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user