Lines Matching refs:GEPI
1090 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument
1091 if (GEPI.use_empty()) in visitGetElementPtrInst()
1092 return markAsDead(GEPI); in visitGetElementPtrInst()
1094 return Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst()
3940 bool unfoldGEPSelect(GetElementPtrInst &GEPI) { in unfoldGEPSelect() argument
3943 SelectInst *Sel = dyn_cast<SelectInst>(GEPI.getPointerOperand()); in unfoldGEPSelect()
3944 for (Value *Op : GEPI.indices()) { in unfoldGEPSelect()
3965 dbgs() << " " << GEPI << "\n";); in unfoldGEPSelect()
3969 for (Value *Op : GEPI.operands()) in unfoldGEPSelect()
3982 IRB.SetInsertPoint(&GEPI); in unfoldGEPSelect()
3983 GEPNoWrapFlags NW = GEPI.getNoWrapFlags(); in unfoldGEPSelect()
3985 Type *Ty = GEPI.getSourceElementType(); in unfoldGEPSelect()
3995 Visited.erase(&GEPI); in unfoldGEPSelect()
3996 GEPI.replaceAllUsesWith(NSel); in unfoldGEPSelect()
3997 GEPI.eraseFromParent(); in unfoldGEPSelect()
4013 bool unfoldGEPPhi(GetElementPtrInst &GEPI) { in unfoldGEPPhi() argument
4017 PHINode *Phi = dyn_cast<PHINode>(GEPI.getPointerOperand()); in unfoldGEPPhi()
4029 if (IsInvalidPointerOperand(GEPI.getPointerOperand())) in unfoldGEPPhi()
4034 for (Value *Op : GEPI.indices()) { in unfoldGEPPhi()
4055 dbgs() << " " << GEPI << "\n";); in unfoldGEPPhi()
4059 for (Value *Op : GEPI.operands()) in unfoldGEPPhi()
4068 PHINode *NewPhi = IRB.CreatePHI(GEPI.getType(), Phi->getNumIncomingValues(), in unfoldGEPPhi()
4071 Type *SourceTy = GEPI.getSourceElementType(); in unfoldGEPPhi()
4074 IRB.SetInsertPoint(GEPI.getFunction()->getEntryBlock().getTerminator()); in unfoldGEPPhi()
4085 Phi->getName() + ".sroa.gep", GEPI.getNoWrapFlags()); in unfoldGEPPhi()
4090 Visited.erase(&GEPI); in unfoldGEPPhi()
4091 GEPI.replaceAllUsesWith(NewPhi); in unfoldGEPPhi()
4092 GEPI.eraseFromParent(); in unfoldGEPPhi()
4105 bool visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument
4106 if (unfoldGEPSelect(GEPI)) in visitGetElementPtrInst()
4109 if (unfoldGEPPhi(GEPI)) in visitGetElementPtrInst()
4112 enqueueUsers(GEPI); in visitGetElementPtrInst()