Lines Matching refs:GEPI

156     void isSafeGEP(GetElementPtrInst *GEPI, uint64_t &Offset, AllocaInfo &Info);
172 void RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
1606 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1608 isSafeGEP(GEPI, GEPOffset, Info);
1610 isSafeForScalarRepl(GEPI, GEPOffset, Info);
1673 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1677 if (!GEPI->hasAllZeroIndices())
1679 isSafePHISelectUseForScalarRepl(GEPI, Offset, Info);
1711 void SROA::isSafeGEP(GetElementPtrInst *GEPI,
1713 gep_type_iterator GEPIt = gep_type_begin(GEPI), E = gep_type_end(GEPI);
1728 return MarkUnsafe(Info, GEPI);
1733 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
1739 Offset += TD->getIndexedOffset(GEPI->getPointerOperandType(), Indices);
1742 MarkUnsafe(Info, GEPI);
1878 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1879 RewriteGEP(GEPI, AI, Offset, NewElts);
2039 void SROA::RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
2042 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
2048 if (!GEPI->hasAllConstantIndices())
2050 Offset += TD->getIndexedOffset(GEPI->getPointerOperandType(), Indices);
2052 RewriteForScalarRepl(GEPI, AI, Offset, NewElts);
2057 if (GEPI->getOperand(0) == AI)
2089 Val = GetElementPtrInst::CreateInBounds(Val, NewArgs, "", GEPI);
2090 Val->takeName(GEPI);
2092 if (Val->getType() != GEPI->getType())
2093 Val = new BitCastInst(Val, GEPI->getType(), Val->getName(), GEPI);
2094 GEPI->replaceAllUsesWith(Val);
2095 DeadInsts.push_back(GEPI);