mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
eliminate CallInst::ArgOffset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108522 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -969,7 +969,7 @@ void SROA::isSafeForScalarRepl(Instruction *I, AllocaInst *AI, uint64_t Offset,
|
||||
ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength());
|
||||
if (Length)
|
||||
isSafeMemAccess(AI, Offset, Length->getZExtValue(), 0,
|
||||
UI.getOperandNo() == CallInst::ArgOffset, Info);
|
||||
UI.getOperandNo() == 0, Info);
|
||||
else
|
||||
MarkUnsafe(Info);
|
||||
} else if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
|
||||
@@ -1787,7 +1787,7 @@ static bool isOnlyCopiedFromConstantGlobal(Value *V, MemTransferInst *&TheCopy,
|
||||
if (isOffset) return false;
|
||||
|
||||
// If the memintrinsic isn't using the alloca as the dest, reject it.
|
||||
if (UI.getOperandNo() != CallInst::ArgOffset) return false;
|
||||
if (UI.getOperandNo() != 0) return false;
|
||||
|
||||
// If the source of the memcpy/move is not a constant global, reject it.
|
||||
if (!PointsToConstantGlobal(MI->getSource()))
|
||||
|
Reference in New Issue
Block a user