Lines Matching refs:Idx
69 ConstantUser(Instruction *Inst, unsigned Idx) : Inst(Inst), OpndIdx(Idx) { } in ConstantUser()
82 void addUser(Instruction *Inst, unsigned Idx, unsigned Cost) { in addUser()
84 Uses.push_back(ConstantUser(Inst, Idx)); in addUser()
157 Instruction *findMatInsertPt(Instruction *Inst, unsigned Idx = ~0U) const;
160 Instruction *Inst, unsigned Idx,
215 unsigned Idx) const { in findMatInsertPt()
218 if (Idx != ~0U) { in findMatInsertPt()
219 Value *Opnd = Inst->getOperand(Idx); in findMatInsertPt()
232 if (Idx != ~0U && isa<PHINode>(Inst)) in findMatInsertPt()
233 return cast<PHINode>(Inst)->getIncomingBlock(Idx)->getTerminator(); in findMatInsertPt()
277 unsigned Idx, in collectConstantCandidates() argument
283 Cost = TTI->getIntImmCost(IntrInst->getIntrinsicID(), Idx, in collectConstantCandidates()
286 Cost = TTI->getIntImmCost(Inst->getOpcode(), Idx, ConstInt->getValue(), in collectConstantCandidates()
298 ConstCandVec[Itr->second].addUser(Inst, Idx, Cost); in collectConstantCandidates()
299 DEBUG(if (isa<ConstantInt>(Inst->getOperand(Idx))) in collectConstantCandidates()
304 << *Inst << " via " << *Inst->getOperand(Idx) << " with cost " in collectConstantCandidates()
324 for (unsigned Idx = 0, E = Inst->getNumOperands(); Idx != E; ++Idx) { in collectConstantCandidates() local
325 Value *Opnd = Inst->getOperand(Idx); in collectConstantCandidates()
329 collectConstantCandidates(ConstCandMap, Inst, Idx, ConstInt); in collectConstantCandidates()
343 collectConstantCandidates(ConstCandMap, Inst, Idx, ConstInt); in collectConstantCandidates()
357 collectConstantCandidates(ConstCandMap, Inst, Idx, ConstInt); in collectConstantCandidates()
445 static bool updateOperand(Instruction *Inst, unsigned Idx, Instruction *Mat) { in updateOperand() argument
453 BasicBlock *IncomingBB = PHI->getIncomingBlock(Idx); in updateOperand()
454 for (unsigned i = 0; i < Idx; ++i) { in updateOperand()
457 Inst->setOperand(Idx, IncomingVal); in updateOperand()
463 Inst->setOperand(Idx, Mat); in updateOperand()