Lines Matching refs:GEP

96                       GetElementPtrInst *GEP, IRBuilder<> &Builder);
148 Value *foldGEP(GetElementPtrInst *GEP, Value *&Offsets, unsigned &Scale,
231 if (auto *GEP = dyn_cast<GetElementPtrInst>(Ptr)) { in decomposePtr() local
232 if (Value *V = decomposeGEP(Offsets, Ty, GEP, Builder)) { in decomposePtr()
234 computeScale(GEP->getSourceElementType()->getPrimitiveSizeInBits(), in decomposePtr()
256 GetElementPtrInst *GEP, in decomposeGEP() argument
258 if (!GEP) { in decomposeGEP()
265 Value *GEPPtr = GEP->getPointerOperand(); in decomposeGEP()
266 Offsets = GEP->getOperand(1); in decomposeGEP()
271 if (GEP->getNumOperands() != 2) { in decomposeGEP()
276 Offsets = GEP->getOperand(1); in decomposeGEP()
744 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryCreateIncrementingGatScat() local
746 Value *BasePtr = decomposeGEP(Offsets, Ty, GEP, Builder); in tryCreateIncrementingGatScat()
756 computeScale(DL->getTypeSizeInBits(GEP->getOperand(0)->getType()), in tryCreateIncrementingGatScat()
757 DL->getTypeSizeInBits(GEP->getType()) / in tryCreateIncrementingGatScat()
758 cast<FixedVectorType>(GEP->getType())->getNumElements()); in tryCreateIncrementingGatScat()
762 if (GEP->hasOneUse()) { in tryCreateIncrementingGatScat()
1188 Value *MVEGatherScatterLowering::foldGEP(GetElementPtrInst *GEP, in foldGEP() argument
1191 Value *GEPPtr = GEP->getPointerOperand(); in foldGEP()
1192 Offsets = GEP->getOperand(1); in foldGEP()
1193 Scale = DL->getTypeAllocSize(GEP->getSourceElementType()); in foldGEP()
1196 if (GEP->getNumIndices() != 1 || !isa<Constant>(Offsets)) in foldGEP()
1204 Offsets, Scale, GEP->getOperand(1), in foldGEP()
1205 DL->getTypeAllocSize(GEP->getSourceElementType()), Builder); in foldGEP()
1216 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Address); in optimiseAddress() local
1217 if (!GEP) in optimiseAddress()
1220 if (GEP->hasOneUse() && isa<GetElementPtrInst>(GEP->getPointerOperand())) { in optimiseAddress()
1221 IRBuilder<> Builder(GEP->getContext()); in optimiseAddress()
1222 Builder.SetInsertPoint(GEP); in optimiseAddress()
1223 Builder.SetCurrentDebugLocation(GEP->getDebugLoc()); in optimiseAddress()
1226 Value *Base = foldGEP(GEP, Offsets, Scale, Builder); in optimiseAddress()
1231 if (Offsets && Base && Base != GEP) { in optimiseAddress()
1238 "gep.merged", GEP->getIterator()); in optimiseAddress()
1239 LLVM_DEBUG(dbgs() << "Folded GEP: " << *GEP in optimiseAddress()
1241 GEP->replaceAllUsesWith( in optimiseAddress()
1242 Builder.CreateBitCast(NewAddress, GEP->getType())); in optimiseAddress()
1243 GEP = NewAddress; in optimiseAddress()
1247 Changed |= optimiseOffsets(GEP->getOperand(1), GEP->getParent(), LI); in optimiseAddress()