Lines Matching defs:LF
1704 const LSRFixup &LF,
1708 Value *Expand(const LSRFixup &LF,
1713 void RewriteForPHI(PHINode *PN, const LSRFixup &LF,
1718 void Rewrite(const LSRFixup &LF,
2912 LSRFixup &LF = getNewFixup();
2913 LF.UserInst = UserInst;
2914 LF.OperandValToReplace = UI->getOperandValToReplace();
2915 LF.PostIncLoops = UI->getPostIncLoops();
2919 if (isAddressUse(LF.UserInst, LF.OperandValToReplace)) {
2921 AccessTy = getAccessType(LF.UserInst);
2932 if (ICmpInst *CI = dyn_cast<ICmpInst>(LF.UserInst))
2937 if (NV == LF.OperandValToReplace) {
2950 LF.PostIncLoops, SE, DT);
2965 LF.LUIdx = P.first;
2966 LF.Offset = P.second;
2967 LSRUse &LU = Uses[LF.LUIdx];
2968 LU.AllFixupsOutsideLoop &= LF.isUseFullyOutsideLoop(L);
2971 SE.getTypeSizeInBits(LF.OperandValToReplace->getType()))
2972 LU.WidestFixupType = LF.OperandValToReplace->getType();
2976 InsertInitialFormula(S, LU, LF.LUIdx);
2977 CountRegisters(LU.Formulae.back(), LF.LUIdx);
3094 LSRFixup &LF = getNewFixup();
3095 LF.UserInst = const_cast<Instruction *>(UserInst);
3096 LF.OperandValToReplace = UI.getUse();
3098 LF.LUIdx = P.first;
3099 LF.Offset = P.second;
3100 LSRUse &LU = Uses[LF.LUIdx];
3101 LU.AllFixupsOutsideLoop &= LF.isUseFullyOutsideLoop(L);
3104 SE.getTypeSizeInBits(LF.OperandValToReplace->getType()))
3105 LU.WidestFixupType = LF.OperandValToReplace->getType();
3106 InsertSupplementalFormula(U, LU, LF.LUIdx);
4286 const LSRFixup &LF,
4293 if (Instruction *I = dyn_cast<Instruction>(LF.OperandValToReplace))
4297 dyn_cast<Instruction>(cast<ICmpInst>(LF.UserInst)->getOperand(1)))
4299 if (LF.PostIncLoops.count(L)) {
4300 if (LF.isUseFullyOutsideLoop(L))
4307 for (PostIncLoopSet::const_iterator I = LF.PostIncLoops.begin(),
4308 E = LF.PostIncLoops.end(); I != E; ++I) {
4350 Value *LSRInstance::Expand(const LSRFixup &LF,
4355 const LSRUse &LU = Uses[LF.LUIdx];
4359 LF, LU, Rewriter);
4363 Rewriter.setPostInc(LF.PostIncLoops);
4366 Type *OpTy = LF.OperandValToReplace->getType();
4388 PostIncLoopSet &Loops = const_cast<PostIncLoopSet &>(LF.PostIncLoops);
4390 LF.UserInst, LF.OperandValToReplace,
4402 PostIncLoopSet &Loops = const_cast<PostIncLoopSet &>(LF.PostIncLoops);
4404 LF.UserInst, LF.OperandValToReplace,
4451 int64_t Offset = (uint64_t)F.BaseOffset + LF.Offset;
4490 ICmpInst *CI = cast<ICmpInst>(LF.UserInst);
4525 const LSRFixup &LF,
4532 if (PN->getIncomingValue(i) == LF.OperandValToReplace) {
4578 Value *FullV = Expand(LF, F, BB->getTerminator(), Rewriter, DeadInsts);
4581 Type *OpTy = LF.OperandValToReplace->getType();
4586 FullV, LF.OperandValToReplace->getType(),
4598 void LSRInstance::Rewrite(const LSRFixup &LF,
4605 if (PHINode *PN = dyn_cast<PHINode>(LF.UserInst)) {
4606 RewriteForPHI(PN, LF, F, Rewriter, DeadInsts, P);
4608 Value *FullV = Expand(LF, F, LF.UserInst, Rewriter, DeadInsts);
4611 Type *OpTy = LF.OperandValToReplace->getType();
4615 FullV, OpTy, "tmp", LF.UserInst);
4621 // its new value may happen to be equal to LF.OperandValToReplace, in
4624 if (Uses[LF.LUIdx].Kind == LSRUse::ICmpZero)
4625 LF.UserInst->setOperand(0, FullV);
4627 LF.UserInst->replaceUsesOfWith(LF.OperandValToReplace, FullV);
4630 DeadInsts.push_back(LF.OperandValToReplace);