Home | History | Annotate | Download | only in Scalar

Lines Matching refs:GEPI

157     void isSafeGEP(GetElementPtrInst *GEPI, uint64_t &Offset, AllocaInfo &Info);
174 void RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
1617 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1619 isSafeGEP(GEPI, GEPOffset, Info);
1621 isSafeForScalarRepl(GEPI, GEPOffset, Info);
1683 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) {
1687 if (!GEPI->hasAllZeroIndices())
1689 isSafePHISelectUseForScalarRepl(GEPI, Offset, Info);
1721 void SROA::isSafeGEP(GetElementPtrInst *GEPI,
1723 gep_type_iterator GEPIt = gep_type_begin(GEPI), E = gep_type_end(GEPI);
1738 return MarkUnsafe(Info, GEPI);
1743 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
1750 const DataLayout &DL = GEPI->getModule()->getDataLayout();
1751 Offset += DL.getIndexedOffset(GEPI->getPointerOperandType(), Indices);
1754 MarkUnsafe(Info, GEPI);
1893 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1894 RewriteGEP(GEPI, AI, Offset, NewElts);
2055 void SROA::RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
2058 const DataLayout &DL = GEPI->getModule()->getDataLayout();
2059 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
2065 if (!GEPI->hasAllConstantIndices())
2067 Offset += DL.getIndexedOffset(GEPI->getPointerOperandType(), Indices);
2069 RewriteForScalarRepl(GEPI, AI, Offset, NewElts);
2074 if (GEPI->getOperand(0) == AI)
2106 Val = GetElementPtrInst::CreateInBounds(Val, NewArgs, "", GEPI);
2107 Val->takeName(GEPI);
2109 if (Val->getType() != GEPI->getType())
2110 Val = new BitCastInst(Val, GEPI->getType(), Val->getName(), GEPI);
2111 GEPI->replaceAllUsesWith(Val);
2112 DeadInsts.push_back(GEPI);