Lines Matching refs:LSRUse
1173 class LSRUse;
1187 const LSRUse &LU, const Formula &F);
1191 const LSRUse &LU, const Formula &F,
1241 const LSRUse &LU,
1313 class LSRUse { class
1364 LSRUse(KindType K, MemAccessTy AT) : Kind(K), AccessTy(AT) {} in LSRUse() function in __anonc21373340811::LSRUse
1392 LSRUse::KindType Kind, MemAccessTy AccessTy,
1505 const LSRUse &LU, in RateFormula()
1558 if (LU.Kind == LSRUse::Address && Offset.isNonZero() && in RateFormula()
1559 !isAMCompletelyFolded(*TTI, LSRUse::Address, LU.AccessTy, F.BaseGV, in RateFormula()
1598 if (LU.Kind == LSRUse::ICmpZero && !F.hasZeroEnd() && in RateFormula()
1605 if (LU.Kind != LSRUse::ICmpZero) in RateFormula()
1701 bool LSRUse::HasFormulaWithSameRegs(const Formula &F) const { in HasFormulaWithSameRegs()
1710 float LSRUse::getNotSelectedProbability(const SCEV *Reg) const { in getNotSelectedProbability()
1720 bool LSRUse::InsertFormula(const Formula &F, const Loop &L) { in InsertFormula()
1754 void LSRUse::DeleteFormula(Formula &F) { in DeleteFormula()
1761 void LSRUse::RecomputeRegs(size_t LUIdx, RegUseTracker &RegUses) { in RecomputeRegs()
1777 void LSRUse::print(raw_ostream &OS) const { in print()
1810 LLVM_DUMP_METHOD void LSRUse::dump() const { in dump()
1816 LSRUse::KindType Kind, MemAccessTy AccessTy, in isAMCompletelyFolded()
1821 case LSRUse::Address: { in isAMCompletelyFolded()
1830 case LSRUse::ICmpZero: in isAMCompletelyFolded()
1867 case LSRUse::Basic: in isAMCompletelyFolded()
1871 case LSRUse::Special: in isAMCompletelyFolded()
1881 LSRUse::KindType Kind, MemAccessTy AccessTy, in isAMCompletelyFolded()
1907 LSRUse::KindType Kind, MemAccessTy AccessTy, in isAMCompletelyFolded()
1923 Immediate MaxOffset, LSRUse::KindType Kind, in isLegalUse()
1937 Immediate MaxOffset, LSRUse::KindType Kind, in isLegalUse()
1952 const LSRUse &LU, const Formula &F) { in isAMCompletelyFolded()
1954 if (LU.Kind == LSRUse::Address && TTI.LSRWithInstrQueries()) { in isAMCompletelyFolded()
1956 if (!isAMCompletelyFolded(TTI, LSRUse::Address, LU.AccessTy, F.BaseGV, in isAMCompletelyFolded()
1969 const LSRUse &LU, const Formula &F, in getScalingFactorCost()
1981 case LSRUse::Address: { in getScalingFactorCost()
2002 case LSRUse::ICmpZero: in getScalingFactorCost()
2003 case LSRUse::Basic: in getScalingFactorCost()
2004 case LSRUse::Special: in getScalingFactorCost()
2014 LSRUse::KindType Kind, MemAccessTy AccessTy, in isAlwaysFoldable()
2023 int64_t Scale = Kind == LSRUse::ICmpZero ? -1 : 1; in isAlwaysFoldable()
2037 if (HasBaseReg && BaseOffset.isNonZero() && Kind != LSRUse::ICmpZero && in isAlwaysFoldable()
2047 Immediate MaxOffset, LSRUse::KindType Kind, in isAlwaysFoldable()
2070 int64_t Scale = Kind == LSRUse::ICmpZero ? -1 : 1; in isAlwaysFoldable()
2177 mutable SmallVector<LSRUse, 16> Uses;
2212 using UseMapTy = DenseMap<LSRUse::SCEVUseKindPair, size_t>;
2215 bool reconcileNewOffset(LSRUse &LU, Immediate NewOffset, bool HasBaseReg,
2216 LSRUse::KindType Kind, MemAccessTy AccessTy);
2218 std::pair<size_t, Immediate> getUse(const SCEV *&Expr, LSRUse::KindType Kind,
2221 void DeleteUse(LSRUse &LU, size_t LUIdx);
2223 LSRUse *FindUseWithSimilarFormula(const Formula &F, const LSRUse &OrigLU);
2225 void InsertInitialFormula(const SCEV *S, LSRUse &LU, size_t LUIdx);
2226 void InsertSupplementalFormula(const SCEV *S, LSRUse &LU, size_t LUIdx);
2228 bool InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F);
2232 void GenerateReassociations(LSRUse &LU, unsigned LUIdx, Formula Base,
2235 void GenerateReassociationsImpl(LSRUse &LU, unsigned LUIdx,
2238 void GenerateCombinations(LSRUse &LU, unsigned LUIdx, Formula Base);
2239 void GenerateSymbolicOffsetsImpl(LSRUse &LU, unsigned LUIdx,
2242 void GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
2243 void GenerateConstantOffsetsImpl(LSRUse &LU, unsigned LUIdx,
2247 void GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
2248 void GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2249 void GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2250 void GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base);
2279 const LSRUse &LU) const;
2281 Value *Expand(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2284 void RewriteForPHI(PHINode *PN, const LSRUse &LU, const LSRFixup &LF,
2287 void Rewrite(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2755 bool LSRInstance::reconcileNewOffset(LSRUse &LU, Immediate NewOffset, in reconcileNewOffset()
2756 bool HasBaseReg, LSRUse::KindType Kind, in reconcileNewOffset()
2771 if (Kind == LSRUse::Address) { in reconcileNewOffset()
2809 LSRUse::KindType Kind, in getUse()
2822 UseMap.insert(std::make_pair(LSRUse::SCEVUseKindPair(Expr, Kind), 0)); in getUse()
2826 LSRUse &LU = Uses[LUIdx]; in getUse()
2835 Uses.push_back(LSRUse(Kind, AccessTy)); in getUse()
2836 LSRUse &LU = Uses[LUIdx]; in getUse()
2844 void LSRInstance::DeleteUse(LSRUse &LU, size_t LUIdx) { in DeleteUse()
2855 LSRUse *
2857 const LSRUse &OrigLU) { in FindUseWithSimilarFormula()
2859 for (LSRUse &LU : Uses) { in FindUseWithSimilarFormula()
2866 LU.Kind != LSRUse::ICmpZero && in FindUseWithSimilarFormula()
3382 if (!isAlwaysFoldable(TTI, LSRUse::Address, AccessTy, /*BaseGV=*/nullptr, in canFoldIVIncExpr()
3540 LSRUse::KindType Kind = LSRUse::Basic; in CollectFixupsAndInitialFormulae()
3543 Kind = LSRUse::Address; in CollectFixupsAndInitialFormulae()
3584 Kind = LSRUse::ICmpZero; in CollectFixupsAndInitialFormulae()
3600 Kind = LSRUse::ICmpZero; in CollectFixupsAndInitialFormulae()
3618 LSRUse &LU = Uses[LUIdx]; in CollectFixupsAndInitialFormulae()
3653 void LSRInstance::InsertInitialFormula(const SCEV *S, LSRUse &LU, in InsertInitialFormula()
3669 LSRUse &LU, size_t LUIdx) { in InsertSupplementalFormula()
3687 bool LSRInstance::InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F) { in InsertFormula()
3808 getUse(S, LSRUse::Basic, MemAccessTy()); in CollectLoopInvariantFixupsAndFormulae()
3811 LSRUse &LU = Uses[LUIdx]; in CollectLoopInvariantFixupsAndFormulae()
3893 LSRUse &LU, const SCEV *S, const Loop *L, in mayUsePostIncMode()
3895 if (LU.Kind != LSRUse::Address || in mayUsePostIncMode()
3915 void LSRInstance::GenerateReassociationsImpl(LSRUse &LU, unsigned LUIdx, in GenerateReassociationsImpl()
4013 void LSRInstance::GenerateReassociations(LSRUse &LU, unsigned LUIdx, in GenerateReassociations()
4030 void LSRInstance::GenerateCombinations(LSRUse &LU, unsigned LUIdx, in GenerateCombinations()
4094 void LSRInstance::GenerateSymbolicOffsetsImpl(LSRUse &LU, unsigned LUIdx, in GenerateSymbolicOffsetsImpl()
4113 void LSRInstance::GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, in GenerateSymbolicOffsets()
4127 LSRUse &LU, unsigned LUIdx, const Formula &Base, in GenerateConstantOffsetsImpl()
4167 if (AMK == TTI::AMK_PreIndexed && LU.Kind == LSRUse::Address) { in GenerateConstantOffsetsImpl()
4207 void LSRInstance::GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx, in GenerateConstantOffsets()
4225 void LSRInstance::GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx, in GenerateICmpZeroScales()
4227 if (LU.Kind != LSRUse::ICmpZero) return; in GenerateICmpZeroScales()
4326 void LSRInstance::GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateScales()
4347 if (LU.Kind == LSRUse::Basic && in GenerateScales()
4348 isLegalUse(TTI, LU.MinOffset, LU.MaxOffset, LSRUse::Special, in GenerateScales()
4351 LU.Kind = LSRUse::Special; in GenerateScales()
4357 if (LU.Kind == LSRUse::ICmpZero && !Base.HasBaseReg && in GenerateScales()
4416 void LSRInstance::GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateTruncates()
4606 LSRUse &LU = Uses[LUIdx]; in GenerateCrossUseConstantOffsets()
4716 LSRUse &LU = Uses[LUIdx]; in GenerateAllReuseFormulae()
4723 LSRUse &LU = Uses[LUIdx]; in GenerateAllReuseFormulae()
4734 LSRUse &LU = Uses[LUIdx]; in GenerateAllReuseFormulae()
4764 LSRUse &LU = Uses[LUIdx]; in FilterOutUndesirableDedicatedRegisters()
4852 for (const LSRUse &LU : Uses) { in EstimateSearchSpaceComplexity()
4877 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByDetectingSupersets()
4948 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByCollapsingUnrolledCode()
4953 LSRUse *LUThatHas = FindUseWithSimilarFormula(F, LU); in NarrowSearchSpaceByCollapsingUnrolledCode()
5045 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
5131 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByFilterPostInc()
5133 if (LU.Kind != LSRUse::Address) in NarrowSearchSpaceByFilterPostInc()
5226 for (const LSRUse &LU : Uses) { in NarrowSearchSpaceByDeletingCostlyFormulas()
5243 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByDeletingCostlyFormulas()
5362 if (LUIdx >= 0 && Uses[LUIdx].Kind == LSRUse::Address && in NarrowSearchSpaceByPickingWinnerRegs()
5380 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByPickingWinnerRegs()
5439 const LSRUse &LU = Uses[Workspace.size()]; in SolveRecurse()
5459 if (AMK != TTI::AMK_PostIndexed || LU.Kind != LSRUse::Address) { in SolveRecurse()
5623 BasicBlock::iterator LowestIP, const LSRFixup &LF, const LSRUse &LU) const { in AdjustInsertPositionForExpand()
5630 if (LU.Kind == LSRUse::ICmpZero) in AdjustInsertPositionForExpand()
5684 Value *LSRInstance::Expand(const LSRUse &LU, const LSRFixup &LF, in Expand()
5733 if (LU.Kind == LSRUse::ICmpZero) { in Expand()
5752 if (!Ops.empty() && LU.Kind == LSRUse::Address && in Expand()
5793 if (LU.Kind == LSRUse::ICmpZero) { in Expand()
5829 if (LU.Kind == LSRUse::ICmpZero) { in Expand()
5869 PHINode *PN, const LSRUse &LU, const LSRFixup &LF, const Formula &F, in RewriteForPHI()
5960 for (LSRUse &LU : Uses) in RewriteForPHI()
6000 void LSRInstance::Rewrite(const LSRUse &LU, const LSRFixup &LF, in Rewrite()
6024 if (LU.Kind == LSRUse::ICmpZero) in Rewrite()
6038 const LSRUse &LU, Instruction *IVIncInsertPos, in canHoistIVInc()
6040 if (LU.Kind != LSRUse::Address) in canHoistIVInc()
6256 for (const LSRUse &LU : Uses) { in LSRInstance()
6290 for (const LSRUse &LU : Uses) in print_fixups()
6300 for (const LSRUse &LU : Uses) { in print_uses()