Lines Matching refs:Formula
483 struct Formula { struct
521 Formula() = default;
603 void Formula::initialMatch(const SCEV *S, Loop *L, ScalarEvolution &SE) { in initialMatch()
631 bool Formula::isCanonical(const Loop &L) const { in isCanonical()
658 void Formula::canonicalize(const Loop &L) { in canonicalize()
695 bool Formula::unscale() { in unscale()
704 bool Formula::hasZeroEnd() const { in hasZeroEnd()
714 size_t Formula::getNumRegs() const { in getNumRegs()
720 Type *Formula::getType() const { in getType()
728 void Formula::deleteBaseReg(const SCEV *&S) { in deleteBaseReg()
735 bool Formula::referencesReg(const SCEV *S) const { in referencesReg()
741 bool Formula::hasRegsUsedByUsesOtherThan(size_t LUIdx, in hasRegsUsedByUsesOtherThan()
753 void Formula::print(raw_ostream &OS) const { in print()
789 LLVM_DUMP_METHOD void Formula::dump() const { in dump()
1187 const LSRUse &LU, const Formula &F);
1191 const LSRUse &LU, const Formula &F,
1238 void RateFormula(const Formula &F,
1248 void RateRegister(const Formula &F, const SCEV *Reg,
1250 void RatePrimaryRegister(const Formula &F, const SCEV *Reg,
1359 SmallVector<Formula, 12> Formulae;
1379 bool HasFormulaWithSameRegs(const Formula &F) const;
1381 bool InsertFormula(const Formula &F, const Loop &L);
1382 void DeleteFormula(Formula &F);
1418 void Cost::RateRegister(const Formula &F, const SCEV *Reg, in RateRegister()
1488 void Cost::RatePrimaryRegister(const Formula &F, const SCEV *Reg, in RatePrimaryRegister()
1502 void Cost::RateFormula(const Formula &F, in RateFormula()
1701 bool LSRUse::HasFormulaWithSameRegs(const Formula &F) const { in HasFormulaWithSameRegs()
1712 for (const Formula &F : Formulae) in getNotSelectedProbability()
1720 bool LSRUse::InsertFormula(const Formula &F, const Loop &L) { in InsertFormula()
1754 void LSRUse::DeleteFormula(Formula &F) { in DeleteFormula()
1765 for (const Formula &F : Formulae) { in RecomputeRegs()
1908 const Formula &F, const Loop &L) { in isAMCompletelyFolded()
1938 MemAccessTy AccessTy, const Formula &F) { in isLegalUse()
1952 const LSRUse &LU, const Formula &F) { in isAMCompletelyFolded()
1969 const LSRUse &LU, const Formula &F, in getScalingFactorCost()
2223 LSRUse *FindUseWithSimilarFormula(const Formula &F, const LSRUse &OrigLU);
2227 void CountRegisters(const Formula &F, size_t LUIdx);
2228 bool InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F);
2232 void GenerateReassociations(LSRUse &LU, unsigned LUIdx, Formula Base,
2236 const Formula &Base, unsigned Depth,
2238 void GenerateCombinations(LSRUse &LU, unsigned LUIdx, Formula Base);
2240 const Formula &Base, size_t Idx,
2242 void GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
2244 const Formula &Base,
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);
2266 void SolveRecurse(SmallVectorImpl<const Formula *> &Solution,
2268 SmallVectorImpl<const Formula *> &Workspace,
2272 void Solve(SmallVectorImpl<const Formula *> &Solution) const;
2281 Value *Expand(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2285 const Formula &F,
2287 void Rewrite(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2289 void ImplementSolution(const SmallVectorImpl<const Formula *> &Solution);
2856 LSRInstance::FindUseWithSimilarFormula(const Formula &OrigF, in FindUseWithSimilarFormula()
2871 for (const Formula &F : LU.Formulae) { in FindUseWithSimilarFormula()
3630 Formula F; in CollectFixupsAndInitialFormulae()
3659 Formula F; in InsertInitialFormula()
3670 Formula F; in InsertSupplementalFormula()
3678 void LSRInstance::CountRegisters(const Formula &F, size_t LUIdx) { in CountRegisters()
3687 bool LSRInstance::InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F) { in InsertFormula()
3916 const Formula &Base, in GenerateReassociationsImpl()
3964 Formula F = Base; in GenerateReassociationsImpl()
4014 Formula Base, unsigned Depth) { in GenerateReassociations()
4031 Formula Base) { in GenerateCombinations()
4042 Formula NewBase = Base; in GenerateCombinations()
4063 Formula F = NewBase; in GenerateCombinations()
4095 const Formula &Base, size_t Idx, in GenerateSymbolicOffsetsImpl()
4101 Formula F = Base; in GenerateSymbolicOffsetsImpl()
4114 Formula Base) { in GenerateSymbolicOffsets()
4127 LSRUse &LU, unsigned LUIdx, const Formula &Base, in GenerateConstantOffsetsImpl()
4131 Formula F = Base; in GenerateConstantOffsetsImpl()
4191 Formula F = Base; in GenerateConstantOffsetsImpl()
4208 Formula Base) { in GenerateConstantOffsets()
4226 Formula Base) { in GenerateICmpZeroScales()
4278 Formula F = Base; in GenerateICmpZeroScales()
4326 void LSRInstance::GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateScales()
4372 Formula F = Base; in GenerateScales()
4416 void LSRInstance::GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateTruncates()
4440 Formula F = Base; in GenerateTruncates()
4616 Formula F = LU.Formulae[L]; in GenerateCrossUseConstantOffsets()
4631 Formula NewF = F; in GenerateCrossUseConstantOffsets()
4663 Formula NewF = F; in GenerateCrossUseConstantOffsets()
4771 Formula &F = LU.Formulae[FIdx]; in FilterOutUndesirableDedicatedRegisters()
4811 Formula &Best = LU.Formulae[P.first->second]; in FilterOutUndesirableDedicatedRegisters()
4880 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByDetectingSupersets()
4889 Formula NewF = F; in NarrowSearchSpaceByDetectingSupersets()
4909 Formula NewF = F; in NarrowSearchSpaceByDetectingSupersets()
4949 for (const Formula &F : LU.Formulae) { in NarrowSearchSpaceByCollapsingUnrolledCode()
4975 Formula &F = LUThatHas->Formulae[i]; in NarrowSearchSpaceByCollapsingUnrolledCode()
5050 auto IsBetterThan = [&](Formula &FA, Formula &FB) { in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
5082 Formula &F = LU.Formulae[FIdx]; in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
5089 Formula &Best = LU.Formulae[P.first->second]; in NarrowSearchSpaceByFilterFormulaWithSameScaledReg()
5140 for (const Formula &F : LU.Formulae) in NarrowSearchSpaceByFilterPostInc()
5146 Formula &F = LU.Formulae[FIdx]; in NarrowSearchSpaceByFilterPostInc()
5254 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByDeletingCostlyFormulas()
5292 Formula &F = LU.Formulae[0]; in NarrowSearchSpaceByDeletingCostlyFormulas()
5385 Formula &F = LU.Formulae[i]; in NarrowSearchSpaceByPickingWinnerRegs()
5423 void LSRInstance::SolveRecurse(SmallVectorImpl<const Formula *> &Solution, in SolveRecurse()
5425 SmallVectorImpl<const Formula *> &Workspace, in SolveRecurse()
5452 for (const Formula &F : LU.Formulae) { in SolveRecurse()
5505 void LSRInstance::Solve(SmallVectorImpl<const Formula *> &Solution) const { in Solve()
5506 SmallVector<const Formula *, 8> Workspace; in Solve()
5685 const Formula &F, BasicBlock::iterator IP, in Expand()
5869 PHINode *PN, const LSRUse &LU, const LSRFixup &LF, const Formula &F, in RewriteForPHI()
6001 const Formula &F, in Rewrite()
6067 const SmallVectorImpl<const Formula *> &Solution) { in ImplementSolution()
6243 SmallVector<const Formula *, 8> Solution; in LSRInstance()
6257 for (const Formula &F : LU.Formulae) in LSRInstance()
6304 for (const Formula &F : LU.Formulae) { in print_uses()