Lines Matching refs:UserInst
1075 Instruction *UserInst; member
1106 : UserInst(nullptr), OperandValToReplace(nullptr), LUIdx(~size_t(0)), in LSRFixup()
1112 if (const PHINode *PN = dyn_cast<PHINode>(UserInst)) { in isUseFullyOutsideLoop()
1120 return !L->contains(UserInst); in isUseFullyOutsideLoop()
1126 if (StoreInst *Store = dyn_cast<StoreInst>(UserInst)) { in print()
1129 } else if (UserInst->getType()->isVoidTy()) in print()
1130 OS << UserInst->getOpcodeName(); in print()
1132 UserInst->printAsOperand(OS, /*PrintType=*/false); in print()
1571 Instruction *UserInst; member
1576 UserInst(U), IVOperand(O), IncExpr(E) {} in IVInc()
1608 Instruction *tailUserInst() const { return Incs.back().UserInst; } in tailUserInst()
1671 void ChainInstruction(Instruction *UserInst, Instruction *IVOper,
2530 DEBUG(dbgs() << "Chain: " << *Chain.Incs[0].UserInst << " users:\n"; in isProfitableChain()
2586 DEBUG(dbgs() << "Chain: " << *Chain.Incs[0].UserInst << " Cost: " << cost in isProfitableChain()
2593 void LSRInstance::ChainInstruction(Instruction *UserInst, Instruction *IVOper, in ChainInstruction() argument
2620 if (isa<PHINode>(UserInst) && isa<PHINode>(Chain.tailUserInst())) in ChainInstruction()
2637 if (isa<PHINode>(UserInst)) in ChainInstruction()
2650 IVChainVec.push_back(IVChain(IVInc(UserInst, IVOper, LastIncExpr), in ChainInstruction()
2653 DEBUG(dbgs() << "IV Chain#" << ChainIdx << " Head: (" << *UserInst in ChainInstruction()
2656 DEBUG(dbgs() << "IV Chain#" << ChainIdx << " Inc: (" << *UserInst in ChainInstruction()
2659 IVChainVec[ChainIdx].add(IVInc(UserInst, IVOper, LastIncExpr)); in ChainInstruction()
2685 if (IncIter->UserInst == OtherUse) in ChainInstruction()
2701 ChainUsersVec[ChainIdx].FarUsers.erase(UserInst); in ChainInstruction()
2797 DEBUG(dbgs() << "Final Chain: " << *Chain.Incs[0].UserInst << "\n"); in FinalizeChain()
2800 DEBUG(dbgs() << " Inc: " << Inc.UserInst << "\n"); in FinalizeChain()
2801 auto UseI = std::find(Inc.UserInst->op_begin(), Inc.UserInst->op_end(), in FinalizeChain()
2803 assert(UseI != Inc.UserInst->op_end() && "cannot find IV operand"); in FinalizeChain()
2809 static bool canFoldIVIncExpr(const SCEV *IncExpr, Instruction *UserInst, in canFoldIVIncExpr() argument
2812 if (!IncConst || !isAddressUse(UserInst, Operand)) in canFoldIVIncExpr()
2818 MemAccessTy AccessTy = getAccessType(UserInst); in canFoldIVIncExpr()
2834 User::op_iterator IVOpEnd = Head.UserInst->op_end(); in GenerateIVChain()
2836 User::op_iterator IVOpIter = findIVOperand(Head.UserInst->op_begin(), in GenerateIVChain()
2858 DEBUG(dbgs() << "Concealed chain head: " << *Head.UserInst << "\n"); in GenerateIVChain()
2867 Instruction *InsertPt = Inc.UserInst; in GenerateIVChain()
2890 if (!canFoldIVIncExpr(LeftOverExpr, Inc.UserInst, Inc.IVOperand, TTI)) { in GenerateIVChain()
2903 Inc.UserInst->replaceUsesOfWith(Inc.IVOperand, IVOper); in GenerateIVChain()
2933 Instruction *UserInst = U.getUser(); in CollectFixupsAndInitialFormulae() local
2935 User::op_iterator UseI = std::find(UserInst->op_begin(), UserInst->op_end(), in CollectFixupsAndInitialFormulae()
2937 assert(UseI != UserInst->op_end() && "cannot find IV operand"); in CollectFixupsAndInitialFormulae()
2943 LF.UserInst = UserInst; in CollectFixupsAndInitialFormulae()
2949 if (isAddressUse(LF.UserInst, LF.OperandValToReplace)) { in CollectFixupsAndInitialFormulae()
2951 AccessTy = getAccessType(LF.UserInst); in CollectFixupsAndInitialFormulae()
2962 if (ICmpInst *CI = dyn_cast<ICmpInst>(LF.UserInst)) in CollectFixupsAndInitialFormulae()
3094 const Instruction *UserInst = dyn_cast<Instruction>(U.getUser()); in CollectLoopInvariantFixupsAndFormulae() local
3096 if (!UserInst) in CollectLoopInvariantFixupsAndFormulae()
3100 if (UserInst->getParent()->getParent() != L->getHeader()->getParent()) in CollectLoopInvariantFixupsAndFormulae()
3103 const BasicBlock *UseBB = !isa<PHINode>(UserInst) ? in CollectLoopInvariantFixupsAndFormulae()
3104 UserInst->getParent() : in CollectLoopInvariantFixupsAndFormulae()
3105 cast<PHINode>(UserInst)->getIncomingBlock( in CollectLoopInvariantFixupsAndFormulae()
3114 if (SE.isSCEVable(UserInst->getType())) { in CollectLoopInvariantFixupsAndFormulae()
3115 const SCEV *UserS = SE.getSCEV(const_cast<Instruction *>(UserInst)); in CollectLoopInvariantFixupsAndFormulae()
3121 SE.getUnknown(const_cast<Instruction *>(UserInst))); in CollectLoopInvariantFixupsAndFormulae()
3126 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UserInst)) { in CollectLoopInvariantFixupsAndFormulae()
3134 LF.UserInst = const_cast<Instruction *>(UserInst); in CollectLoopInvariantFixupsAndFormulae()
4381 dyn_cast<Instruction>(cast<ICmpInst>(LF.UserInst)->getOperand(1))) in AdjustInsertPositionForExpand()
4473 LF.UserInst, LF.OperandValToReplace, in Expand()
4487 LF.UserInst, LF.OperandValToReplace, in Expand()
4582 ICmpInst *CI = cast<ICmpInst>(LF.UserInst); in Expand()
4699 if (PHINode *PN = dyn_cast<PHINode>(LF.UserInst)) { in Rewrite()
4703 Expand(LF, F, LF.UserInst->getIterator(), Rewriter, DeadInsts); in Rewrite()
4710 FullV, OpTy, "tmp", LF.UserInst); in Rewrite()
4720 LF.UserInst->setOperand(0, FullV); in Rewrite()
4722 LF.UserInst->replaceUsesOfWith(LF.OperandValToReplace, FullV); in Rewrite()