mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 03:29:40 +00:00
[opaque pointer type] gep API migration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
67dcb7d7ca
commit
e265afc254
@ -255,6 +255,7 @@ bool PPCLoopPreIncPrep::runOnLoop(Loop *L) {
|
||||
Value *BasePtr = GetPointerOperand(MemI);
|
||||
assert(BasePtr && "No pointer operand");
|
||||
|
||||
Type *I8Ty = Type::getInt8Ty(MemI->getParent()->getContext());
|
||||
Type *I8PtrTy = Type::getInt8PtrTy(MemI->getParent()->getContext(),
|
||||
BasePtr->getType()->getPointerAddressSpace());
|
||||
|
||||
@ -289,8 +290,8 @@ bool PPCLoopPreIncPrep::runOnLoop(Loop *L) {
|
||||
}
|
||||
|
||||
Instruction *InsPoint = Header->getFirstInsertionPt();
|
||||
GetElementPtrInst *PtrInc =
|
||||
GetElementPtrInst::Create(NewPHI, BasePtrIncSCEV->getValue(),
|
||||
GetElementPtrInst *PtrInc = GetElementPtrInst::Create(
|
||||
I8Ty, NewPHI, BasePtrIncSCEV->getValue(),
|
||||
MemI->hasName() ? MemI->getName() + ".inc" : "", InsPoint);
|
||||
PtrInc->setIsInBounds(IsPtrInBounds(BasePtr));
|
||||
for (pred_iterator PI = pred_begin(Header), PE = pred_end(Header);
|
||||
@ -336,8 +337,8 @@ bool PPCLoopPreIncPrep::runOnLoop(Loop *L) {
|
||||
else if (!PtrIP)
|
||||
PtrIP = I->second;
|
||||
|
||||
GetElementPtrInst *NewPtr =
|
||||
GetElementPtrInst::Create(PtrInc, Diff->getValue(),
|
||||
GetElementPtrInst *NewPtr = GetElementPtrInst::Create(
|
||||
I8Ty, PtrInc, Diff->getValue(),
|
||||
I->second->hasName() ? I->second->getName() + ".off" : "", PtrIP);
|
||||
if (!PtrIP)
|
||||
NewPtr->insertAfter(cast<Instruction>(PtrInc));
|
||||
|
Loading…
Reference in New Issue
Block a user