Lines Matching refs:UserInst
1091 Instruction *UserInst; member
1122 : UserInst(nullptr), OperandValToReplace(nullptr), LUIdx(~size_t(0)), in LSRFixup()
1128 if (const PHINode *PN = dyn_cast<PHINode>(UserInst)) { in isUseFullyOutsideLoop()
1136 return !L->contains(UserInst); in isUseFullyOutsideLoop()
1142 if (StoreInst *Store = dyn_cast<StoreInst>(UserInst)) { in print()
1145 } else if (UserInst->getType()->isVoidTy()) in print()
1146 OS << UserInst->getOpcodeName(); in print()
1148 UserInst->printAsOperand(OS, /*PrintType=*/false); in print()
1587 Instruction *UserInst; member
1592 UserInst(U), IVOperand(O), IncExpr(E) {} in IVInc()
1624 Instruction *tailUserInst() const { return Incs.back().UserInst; } in tailUserInst()
1687 void ChainInstruction(Instruction *UserInst, Instruction *IVOper,
2546 DEBUG(dbgs() << "Chain: " << *Chain.Incs[0].UserInst << " users:\n"; in isProfitableChain()
2602 DEBUG(dbgs() << "Chain: " << *Chain.Incs[0].UserInst << " Cost: " << cost in isProfitableChain()
2609 void LSRInstance::ChainInstruction(Instruction *UserInst, Instruction *IVOper, in ChainInstruction() argument
2636 if (isa<PHINode>(UserInst) && isa<PHINode>(Chain.tailUserInst())) in ChainInstruction()
2653 if (isa<PHINode>(UserInst)) in ChainInstruction()
2666 IVChainVec.push_back(IVChain(IVInc(UserInst, IVOper, LastIncExpr), in ChainInstruction()
2669 DEBUG(dbgs() << "IV Chain#" << ChainIdx << " Head: (" << *UserInst in ChainInstruction()
2672 DEBUG(dbgs() << "IV Chain#" << ChainIdx << " Inc: (" << *UserInst in ChainInstruction()
2675 IVChainVec[ChainIdx].add(IVInc(UserInst, IVOper, LastIncExpr)); in ChainInstruction()
2701 if (IncIter->UserInst == OtherUse) in ChainInstruction()
2717 ChainUsersVec[ChainIdx].FarUsers.erase(UserInst); in ChainInstruction()
2816 DEBUG(dbgs() << "Final Chain: " << *Chain.Incs[0].UserInst << "\n"); in FinalizeChain()
2819 DEBUG(dbgs() << " Inc: " << Inc.UserInst << "\n"); in FinalizeChain()
2820 auto UseI = std::find(Inc.UserInst->op_begin(), Inc.UserInst->op_end(), in FinalizeChain()
2822 assert(UseI != Inc.UserInst->op_end() && "cannot find IV operand"); in FinalizeChain()
2828 static bool canFoldIVIncExpr(const SCEV *IncExpr, Instruction *UserInst, in canFoldIVIncExpr() argument
2831 if (!IncConst || !isAddressUse(UserInst, Operand)) in canFoldIVIncExpr()
2837 MemAccessTy AccessTy = getAccessType(UserInst); in canFoldIVIncExpr()
2853 User::op_iterator IVOpEnd = Head.UserInst->op_end(); in GenerateIVChain()
2855 User::op_iterator IVOpIter = findIVOperand(Head.UserInst->op_begin(), in GenerateIVChain()
2877 DEBUG(dbgs() << "Concealed chain head: " << *Head.UserInst << "\n"); in GenerateIVChain()
2886 Instruction *InsertPt = Inc.UserInst; in GenerateIVChain()
2909 if (!canFoldIVIncExpr(LeftOverExpr, Inc.UserInst, Inc.IVOperand, TTI)) { in GenerateIVChain()
2922 Inc.UserInst->replaceUsesOfWith(Inc.IVOperand, IVOper); in GenerateIVChain()
2952 Instruction *UserInst = U.getUser(); in CollectFixupsAndInitialFormulae() local
2954 User::op_iterator UseI = std::find(UserInst->op_begin(), UserInst->op_end(), in CollectFixupsAndInitialFormulae()
2956 assert(UseI != UserInst->op_end() && "cannot find IV operand"); in CollectFixupsAndInitialFormulae()
2962 LF.UserInst = UserInst; in CollectFixupsAndInitialFormulae()
2968 if (isAddressUse(LF.UserInst, LF.OperandValToReplace)) { in CollectFixupsAndInitialFormulae()
2970 AccessTy = getAccessType(LF.UserInst); in CollectFixupsAndInitialFormulae()
2981 if (ICmpInst *CI = dyn_cast<ICmpInst>(LF.UserInst)) in CollectFixupsAndInitialFormulae()
3113 const Instruction *UserInst = dyn_cast<Instruction>(U.getUser()); in CollectLoopInvariantFixupsAndFormulae() local
3115 if (!UserInst) in CollectLoopInvariantFixupsAndFormulae()
3119 if (UserInst->getParent()->getParent() != L->getHeader()->getParent()) in CollectLoopInvariantFixupsAndFormulae()
3122 const BasicBlock *UseBB = !isa<PHINode>(UserInst) ? in CollectLoopInvariantFixupsAndFormulae()
3123 UserInst->getParent() : in CollectLoopInvariantFixupsAndFormulae()
3124 cast<PHINode>(UserInst)->getIncomingBlock( in CollectLoopInvariantFixupsAndFormulae()
3133 if (SE.isSCEVable(UserInst->getType())) { in CollectLoopInvariantFixupsAndFormulae()
3134 const SCEV *UserS = SE.getSCEV(const_cast<Instruction *>(UserInst)); in CollectLoopInvariantFixupsAndFormulae()
3140 SE.getUnknown(const_cast<Instruction *>(UserInst))); in CollectLoopInvariantFixupsAndFormulae()
3145 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UserInst)) { in CollectLoopInvariantFixupsAndFormulae()
3153 LF.UserInst = const_cast<Instruction *>(UserInst); in CollectLoopInvariantFixupsAndFormulae()
4393 dyn_cast<Instruction>(cast<ICmpInst>(LF.UserInst)->getOperand(1))) in AdjustInsertPositionForExpand()
4485 LF.UserInst, LF.OperandValToReplace, in Expand()
4499 LF.UserInst, LF.OperandValToReplace, in Expand()
4594 ICmpInst *CI = cast<ICmpInst>(LF.UserInst); in Expand()
4711 if (PHINode *PN = dyn_cast<PHINode>(LF.UserInst)) { in Rewrite()
4715 Expand(LF, F, LF.UserInst->getIterator(), Rewriter, DeadInsts); in Rewrite()
4722 FullV, OpTy, "tmp", LF.UserInst); in Rewrite()
4732 LF.UserInst->setOperand(0, FullV); in Rewrite()
4734 LF.UserInst->replaceUsesOfWith(LF.OperandValToReplace, FullV); in Rewrite()