Lines Matching refs:GEPI
373 gep_type_iterator GEPI = gep_type_begin(U), E = gep_type_end(U);
374 ++GEPI; // Skip over the pointer index.
381 for (; GEPI != E; ++GEPI) {
382 if (GEPI.isStruct())
385 ConstantInt *IdxVal = dyn_cast<ConstantInt>(GEPI.getOperand());
386 if (!IdxVal || (GEPI.isBoundedSequential() &&
387 IdxVal->getZExtValue() >= GEPI.getSequentialNumElements()))
576 GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP);
579 for (unsigned i = 3, e = GEPI->getNumOperands(); i != e; ++i)
580 Idxs.push_back(GEPI->getOperand(i));
582 NewTy, NewPtr, Idxs, GEPI->getName() + "." + Twine(Val), GEPI);
587 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(GEP))
588 GEPI->eraseFromParent();
641 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
642 if (!AllUsesOfValueWillTrapIfNull(GEPI, PHIs)) return false;
721 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
724 Idxs.reserve(GEPI->getNumOperands()-1);
725 for (User::op_iterator i = GEPI->op_begin() + 1, e = GEPI->op_end();
731 if (Idxs.size() == GEPI->getNumOperands()-1)
733 GEPI, ConstantExpr::getGetElementPtr(nullptr, NewV, Idxs));
734 if (GEPI->use_empty()) {
736 GEPI->eraseFromParent();
1029 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
1032 if (GEPI->hasAllZeroIndices() && GEPI->hasOneUse())
1033 if (StoreInst *SI = dyn_cast<StoreInst>(GEPI->user_back()))
1037 ReplaceUsesOfMallocWithGlobal(GEPI, GV);
1038 GEPI->eraseFromParent();
1068 if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) {
1070 if (GEPI->getNumOperands() < 3)
1213 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(LoadUser)) {
1214 assert(GEPI->getNumOperands() >= 3 && isa<ConstantInt>(GEPI->getOperand(2))
1215 && "Unexpected GEPI!");
1218 unsigned FieldNo = cast<ConstantInt>(GEPI->getOperand(2))->getZExtValue();
1219 Value *NewPtr = GetHeapSROAValue(GEPI->getOperand(0), FieldNo,
1224 GEPIdx.push_back(GEPI->getOperand(1));
1225 GEPIdx.append(GEPI->op_begin()+3, GEPI->op_end());
1227 Value *NGEPI = GetElementPtrInst::Create(GEPI->getResultElementType(), NewPtr, GEPIdx,
1228 GEPI->getName(), GEPI);
1229 GEPI->replaceAllUsesWith(NGEPI);
1230 GEPI->eraseFromParent();