Lines Matching refs:Formula
355 struct Formula { struct
393 Formula() = default;
475 void Formula::initialMatch(const SCEV *S, Loop *L, ScalarEvolution &SE) { in initialMatch()
503 bool Formula::isCanonical(const Loop &L) const { in isCanonical()
530 void Formula::canonicalize(const Loop &L) { in canonicalize()
567 bool Formula::unscale() { in unscale()
576 bool Formula::hasZeroEnd() const { in hasZeroEnd()
586 size_t Formula::getNumRegs() const { in getNumRegs()
592 Type *Formula::getType() const { in getType()
600 void Formula::deleteBaseReg(const SCEV *&S) { in deleteBaseReg()
607 bool Formula::referencesReg(const SCEV *S) const { in referencesReg()
613 bool Formula::hasRegsUsedByUsesOtherThan(size_t LUIdx, in hasRegsUsedByUsesOtherThan()
625 void Formula::print(raw_ostream &OS) const { in print()
661 LLVM_DUMP_METHOD void Formula::dump() const { in dump()
1051 const LSRUse &LU, const Formula &F);
1055 const LSRUse &LU, const Formula &F,
1102 void RateFormula(const Formula &F,
1112 void RateRegister(const Formula &F, const SCEV *Reg,
1114 void RatePrimaryRegister(const Formula &F, const SCEV *Reg,
1223 SmallVector<Formula, 12> Formulae;
1243 bool HasFormulaWithSameRegs(const Formula &F) const;
1245 bool InsertFormula(const Formula &F, const Loop &L);
1246 void DeleteFormula(Formula &F);
1282 void Cost::RateRegister(const Formula &F, const SCEV *Reg, in RateRegister()
1352 void Cost::RatePrimaryRegister(const Formula &F, const SCEV *Reg, in RatePrimaryRegister()
1366 void Cost::RateFormula(const Formula &F, in RateFormula()
1560 bool LSRUse::HasFormulaWithSameRegs(const Formula &F) const { in HasFormulaWithSameRegs()
1571 for (const Formula &F : Formulae) in getNotSelectedProbability()
1579 bool LSRUse::InsertFormula(const Formula &F, const Loop &L) { in InsertFormula()
1613 void LSRUse::DeleteFormula(Formula &F) { in DeleteFormula()
1624 for (const Formula &F : Formulae) { in RecomputeRegs()
1752 const Formula &F, const Loop &L) { in isAMCompletelyFolded()
1782 MemAccessTy AccessTy, const Formula &F) { in isLegalUse()
1788 const LSRUse &LU, const Formula &F) { in isAMCompletelyFolded()
1805 const LSRUse &LU, const Formula &F, in getScalingFactorCost()
2037 LSRUse *FindUseWithSimilarFormula(const Formula &F, const LSRUse &OrigLU);
2041 void CountRegisters(const Formula &F, size_t LUIdx);
2042 bool InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F);
2046 void GenerateReassociations(LSRUse &LU, unsigned LUIdx, Formula Base,
2050 const Formula &Base, unsigned Depth,
2052 void GenerateCombinations(LSRUse &LU, unsigned LUIdx, Formula Base);
2054 const Formula &Base, size_t Idx,
2056 void GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
2058 const Formula &Base,
2061 void GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
2062 void GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2063 void GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2064 void GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base);
2080 void SolveRecurse(SmallVectorImpl<const Formula *> &Solution,
2082 SmallVectorImpl<const Formula *> &Workspace,
2086 void Solve(SmallVectorImpl<const Formula *> &Solution) const;
2095 Value *Expand(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2099 const Formula &F,
2101 void Rewrite(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2103 void ImplementSolution(const SmallVectorImpl<const Formula *> &Solution);
2660 LSRInstance::FindUseWithSimilarFormula(const Formula &OrigF, in FindUseWithSimilarFormula()
2675 for (const Formula &F : LU.Formulae) { in FindUseWithSimilarFormula()
3395 Formula F; in CollectFixupsAndInitialFormulae()
3424 Formula F; in InsertInitialFormula()
3435 Formula F; in InsertSupplementalFormula()
3443 void LSRInstance::CountRegisters(const Formula &F, size_t LUIdx) { in CountRegisters()
3452 bool LSRInstance::InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F) { in InsertFormula()
3681 const Formula &Base, in GenerateReassociationsImpl()
3729 Formula F = Base; in GenerateReassociationsImpl()
3774 Formula Base, unsigned Depth) { in GenerateReassociations()
3791 Formula Base) { in GenerateCombinations()
3801 Formula NewBase = Base; in GenerateCombinations()
3822 Formula F = NewBase; in GenerateCombinations()
3854 const Formula &Base, size_t Idx, in GenerateSymbolicOffsetsImpl()
3860 Formula F = Base; in GenerateSymbolicOffsetsImpl()
3873 Formula Base) { in GenerateSymbolicOffsets()
3886 LSRUse &LU, unsigned LUIdx, const Formula &Base, in GenerateConstantOffsetsImpl()
3890 Formula F = Base; in GenerateConstantOffsetsImpl()
3944 Formula F = Base; in GenerateConstantOffsetsImpl()
3961 Formula Base) { in GenerateConstantOffsets()
3979 Formula Base) { in GenerateICmpZeroScales()
4027 Formula F = Base; in GenerateICmpZeroScales()
4075 void LSRInstance::GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateScales()
4121 Formula F = Base; in GenerateScales()
4165 void LSRInstance::GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateTruncates()
4189 Formula F = Base; in GenerateTruncates()
4352 Formula F = LU.Formulae[L]; in GenerateCrossUseConstantOffsets()
4365 Formula NewF = F; in GenerateCrossUseConstantOffsets()
4390 Formula NewF = F; in GenerateCrossUseConstantOffsets()
4488 Formula &F = LU.Formulae[FIdx]; in FilterOutUndesirableDedicatedRegisters()
4528 Formula &Best = LU.Formulae[P.first->second]; in FilterOutUndesirableDedicatedRegisters()
4597 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByDetectingSupersets()
4604 Formula NewF = F; in NarrowSearchSpaceByDetectingSupersets()
4622 Formula NewF = F; in NarrowSearchSpaceByDetectingSupersets()
4662 for (const Formula &F : LU.Formulae) { in NarrowSearchSpaceByCollapsingUnrolledCode()
4688 Formula &F = LUThatHas->Formulae[i]; in NarrowSearchSpaceByCollapsingUnrolledCode()
4763 auto IsBetterThan = [&](Formula &FA, Formula &FB) { in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
4795 Formula &F = LU.Formulae[FIdx]; in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
4802 Formula &Best = LU.Formulae[P.first->second]; in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
4853 for (const Formula &F : LU.Formulae) in NarrowSearchSpaceByFilterPostInc()
4859 Formula &F = LU.Formulae[FIdx]; in NarrowSearchSpaceByFilterPostInc()
4967 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByDeletingCostlyFormulas()
5005 Formula &F = LU.Formulae[0]; in NarrowSearchSpaceByDeletingCostlyFormulas()
5098 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByPickingWinnerRegs()
5136 void LSRInstance::SolveRecurse(SmallVectorImpl<const Formula *> &Solution, in SolveRecurse()
5138 SmallVectorImpl<const Formula *> &Workspace, in SolveRecurse()
5165 for (const Formula &F : LU.Formulae) { in SolveRecurse()
5218 void LSRInstance::Solve(SmallVectorImpl<const Formula *> &Solution) const { in Solve()
5219 SmallVector<const Formula *, 8> Workspace; in Solve()
5388 const Formula &F, BasicBlock::iterator IP, in Expand()
5568 PHINode *PN, const LSRUse &LU, const LSRFixup &LF, const Formula &F, in RewriteForPHI()
5701 const Formula &F, in Rewrite()
5767 const SmallVectorImpl<const Formula *> &Solution) { in ImplementSolution()
5941 SmallVector<const Formula *, 8> Solution; in LSRInstance()
5955 for (const Formula &F : LU.Formulae) in LSRInstance()
6002 for (const Formula &F : LU.Formulae) { in print_uses()