[llvm] r232279 - [opaque pointer type] gep API migration
David Blaikie
dblaikie at gmail.com
Sat Mar 14 14:20:51 PDT 2015
Author: dblaikie
Date: Sat Mar 14 16:20:51 2015
New Revision: 232279
URL: http://llvm.org/viewvc/llvm-project?rev=232279&view=rev
Log:
[opaque pointer type] gep API migration
Modified:
llvm/trunk/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp?rev=232279&r1=232278&r2=232279&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp Sat Mar 14 16:20:51 2015
@@ -255,6 +255,7 @@ bool PPCLoopPreIncPrep::runOnLoop(Loop *
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 *
}
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 *
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));
More information about the llvm-commits
mailing list