Lines Matching refs:GEP
109 Value *hoistAddrSpaceCastFromGEP(GEPOperator *GEP, int Depth);
149 GEPOperator *GEP, int Depth) { in hoistAddrSpaceCastFromGEP() argument
151 hoistAddrSpaceCastFrom(GEP->getPointerOperand(), Depth + 1); in hoistAddrSpaceCastFromGEP()
159 SmallVector<Value *, 8> Indices(GEP->idx_begin(), GEP->idx_end()); in hoistAddrSpaceCastFromGEP()
161 if (Instruction *GEPI = dyn_cast<Instruction>(GEP)) { in hoistAddrSpaceCastFromGEP()
167 GEP->getSourceElementType(), Cast->getOperand(0), Indices, in hoistAddrSpaceCastFromGEP()
169 NewGEP->setIsInBounds(GEP->isInBounds()); in hoistAddrSpaceCastFromGEP()
170 NewGEP->takeName(GEP); in hoistAddrSpaceCastFromGEP()
171 NewASC = new AddrSpaceCastInst(NewGEP, GEP->getType(), "", GEPI); in hoistAddrSpaceCastFromGEP()
175 GEP->replaceAllUsesWith(NewASC); in hoistAddrSpaceCastFromGEP()
179 GEP->getSourceElementType(), cast<Constant>(Cast->getOperand(0)), in hoistAddrSpaceCastFromGEP()
180 Indices, GEP->isInBounds()); in hoistAddrSpaceCastFromGEP()
181 NewASC = ConstantExpr::getAddrSpaceCast(NewGEP, GEP->getType()); in hoistAddrSpaceCastFromGEP()
237 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) in hoistAddrSpaceCastFrom() local
238 return hoistAddrSpaceCastFromGEP(GEP, Depth); in hoistAddrSpaceCastFrom()