mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-13 00:11:56 +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);
|
||||
@ -335,9 +336,9 @@ bool PPCLoopPreIncPrep::runOnLoop(Loop *L) {
|
||||
PtrIP = PtrIP->getParent()->getFirstInsertionPt();
|
||||
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…
x
Reference in New Issue
Block a user