Lines Matching refs:GEPI
130 void isSafeGEP(GetElementPtrInst *GEPI, uint64_t &Offset, AllocaInfo &Info);
146 void RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
1512 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1514 isSafeGEP(GEPI, GEPOffset, Info);
1516 isSafeForScalarRepl(GEPI, GEPOffset, Info);
1576 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1580 if (!GEPI->hasAllZeroIndices())
1582 isSafePHISelectUseForScalarRepl(GEPI, Offset, Info);
1614 void SROA::isSafeGEP(GetElementPtrInst *GEPI,
1616 gep_type_iterator GEPIt = gep_type_begin(GEPI), E = gep_type_end(GEPI);
1629 return MarkUnsafe(Info, GEPI);
1634 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
1635 Offset += TD->getIndexedOffset(GEPI->getPointerOperandType(), Indices);
1637 MarkUnsafe(Info, GEPI);
1767 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1768 RewriteGEP(GEPI, AI, Offset, NewElts);
1915 void SROA::RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
1918 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
1919 Offset += TD->getIndexedOffset(GEPI->getPointerOperandType(), Indices);
1921 RewriteForScalarRepl(GEPI, AI, Offset, NewElts);
1926 if (GEPI->getOperand(0) == AI)
1947 Val = GetElementPtrInst::CreateInBounds(Val, NewArgs, "", GEPI);
1948 Val->takeName(GEPI);
1950 if (Val->getType() != GEPI->getType())
1951 Val = new BitCastInst(Val, GEPI->getType(), Val->getName(), GEPI);
1952 GEPI->replaceAllUsesWith(Val);
1953 DeadInsts.push_back(GEPI);