Lines Matching refs:Formula
341 struct Formula { struct
379 Formula() = default;
461 void Formula::initialMatch(const SCEV *S, Loop *L, ScalarEvolution &SE) { in initialMatch()
489 bool Formula::isCanonical(const Loop &L) const { in isCanonical()
516 void Formula::canonicalize(const Loop &L) { in canonicalize()
553 bool Formula::unscale() { in unscale()
562 bool Formula::hasZeroEnd() const { in hasZeroEnd()
572 size_t Formula::getNumRegs() const { in getNumRegs()
578 Type *Formula::getType() const { in getType()
586 void Formula::deleteBaseReg(const SCEV *&S) { in deleteBaseReg()
593 bool Formula::referencesReg(const SCEV *S) const { in referencesReg()
599 bool Formula::hasRegsUsedByUsesOtherThan(size_t LUIdx, in hasRegsUsedByUsesOtherThan()
611 void Formula::print(raw_ostream &OS) const { in print()
647 LLVM_DUMP_METHOD void Formula::dump() const { in dump()
1038 const LSRUse &LU, const Formula &F);
1042 const LSRUse &LU, const Formula &F,
1089 void RateFormula(const Formula &F,
1099 void RateRegister(const Formula &F, const SCEV *Reg,
1101 void RatePrimaryRegister(const Formula &F, const SCEV *Reg,
1210 SmallVector<Formula, 12> Formulae;
1230 bool HasFormulaWithSameRegs(const Formula &F) const;
1232 bool InsertFormula(const Formula &F, const Loop &L);
1233 void DeleteFormula(Formula &F);
1269 void Cost::RateRegister(const Formula &F, const SCEV *Reg, in RateRegister()
1339 void Cost::RatePrimaryRegister(const Formula &F, const SCEV *Reg, in RatePrimaryRegister()
1353 void Cost::RateFormula(const Formula &F, in RateFormula()
1547 bool LSRUse::HasFormulaWithSameRegs(const Formula &F) const { in HasFormulaWithSameRegs()
1558 for (const Formula &F : Formulae) in getNotSelectedProbability()
1566 bool LSRUse::InsertFormula(const Formula &F, const Loop &L) { in InsertFormula()
1600 void LSRUse::DeleteFormula(Formula &F) { in DeleteFormula()
1611 for (const Formula &F : Formulae) { in RecomputeRegs()
1739 const Formula &F, const Loop &L) { in isAMCompletelyFolded()
1769 MemAccessTy AccessTy, const Formula &F) { in isLegalUse()
1775 const LSRUse &LU, const Formula &F) { in isAMCompletelyFolded()
1792 const LSRUse &LU, const Formula &F, in getScalingFactorCost()
2020 LSRUse *FindUseWithSimilarFormula(const Formula &F, const LSRUse &OrigLU);
2024 void CountRegisters(const Formula &F, size_t LUIdx);
2025 bool InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F);
2029 void GenerateReassociations(LSRUse &LU, unsigned LUIdx, Formula Base,
2033 const Formula &Base, unsigned Depth,
2035 void GenerateCombinations(LSRUse &LU, unsigned LUIdx, Formula Base);
2037 const Formula &Base, size_t Idx,
2039 void GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
2041 const Formula &Base,
2044 void GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
2045 void GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2046 void GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2047 void GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base);
2063 void SolveRecurse(SmallVectorImpl<const Formula *> &Solution,
2065 SmallVectorImpl<const Formula *> &Workspace,
2069 void Solve(SmallVectorImpl<const Formula *> &Solution) const;
2078 Value *Expand(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2082 const Formula &F,
2084 void Rewrite(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2086 void ImplementSolution(const SmallVectorImpl<const Formula *> &Solution);
2652 LSRInstance::FindUseWithSimilarFormula(const Formula &OrigF, in FindUseWithSimilarFormula()
2668 for (const Formula &F : LU.Formulae) { in FindUseWithSimilarFormula()
3407 Formula F; in InsertInitialFormula()
3418 Formula F; in InsertSupplementalFormula()
3426 void LSRInstance::CountRegisters(const Formula &F, size_t LUIdx) { in CountRegisters()
3435 bool LSRInstance::InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F) { in InsertFormula()
3659 const Formula &Base, in GenerateReassociationsImpl()
3707 Formula F = Base; in GenerateReassociationsImpl()
3752 Formula Base, unsigned Depth) { in GenerateReassociations()
3769 Formula Base) { in GenerateCombinations()
3779 Formula NewBase = Base; in GenerateCombinations()
3800 Formula F = NewBase; in GenerateCombinations()
3832 const Formula &Base, size_t Idx, in GenerateSymbolicOffsetsImpl()
3838 Formula F = Base; in GenerateSymbolicOffsetsImpl()
3851 Formula Base) { in GenerateSymbolicOffsets()
3864 LSRUse &LU, unsigned LUIdx, const Formula &Base, in GenerateConstantOffsetsImpl()
3868 Formula F = Base; in GenerateConstantOffsetsImpl()
3922 Formula F = Base; in GenerateConstantOffsetsImpl()
3939 Formula Base) { in GenerateConstantOffsets()
3957 Formula Base) { in GenerateICmpZeroScales()
4005 Formula F = Base; in GenerateICmpZeroScales()
4053 void LSRInstance::GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateScales()
4099 Formula F = Base; in GenerateScales()
4120 void LSRInstance::GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateTruncates()
4140 Formula F = Base; in GenerateTruncates()
4302 Formula F = LU.Formulae[L]; in GenerateCrossUseConstantOffsets()
4315 Formula NewF = F; in GenerateCrossUseConstantOffsets()
4340 Formula NewF = F; in GenerateCrossUseConstantOffsets()
4438 Formula &F = LU.Formulae[FIdx]; in FilterOutUndesirableDedicatedRegisters()
4478 Formula &Best = LU.Formulae[P.first->second]; in FilterOutUndesirableDedicatedRegisters()
4547 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByDetectingSupersets()
4554 Formula NewF = F; in NarrowSearchSpaceByDetectingSupersets()
4572 Formula NewF = F; in NarrowSearchSpaceByDetectingSupersets()
4612 for (const Formula &F : LU.Formulae) { in NarrowSearchSpaceByCollapsingUnrolledCode()
4638 Formula &F = LUThatHas->Formulae[i]; in NarrowSearchSpaceByCollapsingUnrolledCode()
4713 auto IsBetterThan = [&](Formula &FA, Formula &FB) { in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
4745 Formula &F = LU.Formulae[FIdx]; in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
4752 Formula &Best = LU.Formulae[P.first->second]; in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
4803 for (const Formula &F : LU.Formulae) in NarrowSearchSpaceByFilterPostInc()
4809 Formula &F = LU.Formulae[FIdx]; in NarrowSearchSpaceByFilterPostInc()
4917 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByDeletingCostlyFormulas()
4955 Formula &F = LU.Formulae[0]; in NarrowSearchSpaceByDeletingCostlyFormulas()
5009 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByPickingWinnerRegs()
5047 void LSRInstance::SolveRecurse(SmallVectorImpl<const Formula *> &Solution, in SolveRecurse()
5049 SmallVectorImpl<const Formula *> &Workspace, in SolveRecurse()
5076 for (const Formula &F : LU.Formulae) { in SolveRecurse()
5129 void LSRInstance::Solve(SmallVectorImpl<const Formula *> &Solution) const { in Solve()
5130 SmallVector<const Formula *, 8> Workspace; in Solve()
5285 const Formula &F, BasicBlock::iterator IP, in Expand()
5463 PHINode *PN, const LSRUse &LU, const LSRFixup &LF, const Formula &F, in RewriteForPHI()
5579 const Formula &F, in Rewrite()
5615 const SmallVectorImpl<const Formula *> &Solution) { in ImplementSolution()
5785 SmallVector<const Formula *, 8> Solution; in LSRInstance()
5799 for (const Formula &F : LU.Formulae) in LSRInstance()
5846 for (const Formula &F : LU.Formulae) { in print_uses()