• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/

Lines Matching refs:LSRUse

214   /// This represents the set of LSRUse indices which reference
984 class LSRUse;
998 const LSRUse &LU, const Formula &F);
1002 const LSRUse &LU, const Formula &F,
1050 const LSRUse &LU,
1079 /// A constant offset to be added to the LSRUse expression. This allows
1080 /// multiple fixups to share the same LSRUse with different offsets, for
1122 class LSRUse {
1148 /// This records whether all of the fixups using this LSRUse are outside of
1160 /// LSRUse. FindUseWithSimilarFormula can't consider uses with different max
1170 /// The set of register candidates used by all formulae in this LSRUse.
1173 LSRUse(KindType K, MemAccessTy AT) : Kind(K), AccessTy(AT) {}
1201 LSRUse::KindType Kind, MemAccessTy AccessTy,
1316 const LSRUse &LU,
1366 if (LU.Kind == LSRUse::Address && Offset != 0 &&
1367 !isAMCompletelyFolded(*TTI, LSRUse::Address, LU.AccessTy, F.BaseGV,
1402 if (LU.Kind == LSRUse::ICmpZero && !F.hasZeroEnd() &&
1409 if (LU.Kind != LSRUse::ICmpZero)
1505 bool LSRUse::HasFormulaWithSameRegs(const Formula &F) const {
1514 float LSRUse::getNotSelectedProbability(const SCEV *Reg) const {
1524 bool LSRUse::InsertFormula(const Formula &F, const Loop &L) {
1558 void LSRUse::DeleteFormula(Formula &F) {
1565 void LSRUse::RecomputeRegs(size_t LUIdx, RegUseTracker &RegUses) {
1581 void LSRUse::print(raw_ostream &OS) const {
1614 LLVM_DUMP_METHOD void LSRUse::dump() const {
1620 LSRUse::KindType Kind, MemAccessTy AccessTy,
1625 case LSRUse::Address:
1629 case LSRUse::ICmpZero:
1661 case LSRUse::Basic:
1665 case LSRUse::Special:
1670 llvm_unreachable("Invalid LSRUse Kind!");
1675 LSRUse::KindType Kind, MemAccessTy AccessTy,
1696 LSRUse::KindType Kind, MemAccessTy AccessTy,
1712 int64_t MaxOffset, LSRUse::KindType Kind,
1726 int64_t MaxOffset, LSRUse::KindType Kind,
1733 const LSRUse &LU, const Formula &F) {
1735 if (LU.Kind == LSRUse::Address && TTI.LSRWithInstrQueries()) {
1737 if (!isAMCompletelyFolded(TTI, LSRUse::Address, LU.AccessTy, F.BaseGV,
1750 const LSRUse &LU, const Formula &F,
1762 case LSRUse::Address: {
1775 case LSRUse::ICmpZero:
1776 case LSRUse::Basic:
1777 case LSRUse::Special:
1783 llvm_unreachable("Invalid LSRUse Kind!");
1787 LSRUse::KindType Kind, MemAccessTy AccessTy,
1795 int64_t Scale = Kind == LSRUse::ICmpZero ? -1 : 1;
1810 int64_t MaxOffset, LSRUse::KindType Kind,
1829 int64_t Scale = Kind == LSRUse::ICmpZero ? -1 : 1;
1931 mutable SmallVector<LSRUse, 16> Uses;
1963 using UseMapTy = DenseMap<LSRUse::SCEVUseKindPair, size_t>;
1966 bool reconcileNewOffset(LSRUse &LU, int64_t NewOffset, bool HasBaseReg,
1967 LSRUse::KindType Kind, MemAccessTy AccessTy);
1969 std::pair<size_t, int64_t> getUse(const SCEV *&Expr, LSRUse::KindType Kind,
1972 void DeleteUse(LSRUse &LU, size_t LUIdx);
1974 LSRUse *FindUseWithSimilarFormula(const Formula &F, const LSRUse &OrigLU);
1976 void InsertInitialFormula(const SCEV *S, LSRUse &LU, size_t LUIdx);
1977 void InsertSupplementalFormula(const SCEV *S, LSRUse &LU, size_t LUIdx);
1979 bool InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F);
1983 void GenerateReassociations(LSRUse &LU, unsigned LUIdx, Formula Base,
1986 void GenerateReassociationsImpl(LSRUse &LU, unsigned LUIdx,
1989 void GenerateCombinations(LSRUse &LU, unsigned LUIdx, Formula Base);
1990 void GenerateSymbolicOffsetsImpl(LSRUse &LU, unsigned LUIdx,
1993 void GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
1994 void GenerateConstantOffsetsImpl(LSRUse &LU, unsigned LUIdx,
1998 void GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
1999 void GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2000 void GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base);
2001 void GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base);
2031 const LSRUse &LU,
2034 Value *Expand(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2037 void RewriteForPHI(PHINode *PN, const LSRUse &LU, const LSRFixup &LF,
2040 void Rewrite(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
2511 bool LSRInstance::reconcileNewOffset(LSRUse &LU, int64_t NewOffset,
2512 bool HasBaseReg, LSRUse::KindType Kind,
2527 if (Kind == LSRUse::Address) {
2554 /// Return an LSRUse index and an offset value for a fixup which needs the given
2558 LSRUse::KindType Kind,
2571 UseMap.insert(std::make_pair(LSRUse::SCEVUseKindPair(Expr, Kind), 0));
2575 LSRUse &LU = Uses[LUIdx];
2584 Uses.push_back(LSRUse(Kind, AccessTy));
2585 LSRUse &LU = Uses[LUIdx];
2593 void LSRInstance::DeleteUse(LSRUse &LU, size_t LUIdx) {
2604 LSRUse *
2606 const LSRUse &OrigLU) {
2609 LSRUse &LU = Uses[LUIdx];
2616 LU.Kind != LSRUse::ICmpZero &&
2633 // can skip the rest of the formulae and proceed to the next LSRUse.
3130 if (!isAlwaysFoldable(TTI, LSRUse::Address, AccessTy, /*BaseGV=*/nullptr,
3257 LSRUse::KindType Kind = LSRUse::Basic;
3260 Kind = LSRUse::Address;
3295 Kind = LSRUse::ICmpZero;
3308 // Get or create an LSRUse.
3312 LSRUse &LU = Uses[LUIdx];
3327 // If this is the first use of this LSRUse, give it a formula.
3340 LSRInstance::InsertInitialFormula(const SCEV *S, LSRUse &LU, size_t LUIdx) {
3355 LSRUse &LU, size_t LUIdx) {
3373 bool LSRInstance::InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F) {
3461 S, LSRUse::Basic, MemAccessTy());
3464 LSRUse &LU = Uses[LUIdx];
3546 LSRUse &LU, const SCEV *S, const Loop *L,
3548 if (LU.Kind != LSRUse::Address ||
3568 void LSRInstance::GenerateReassociationsImpl(LSRUse &LU, unsigned LUIdx,
3661 void LSRInstance::GenerateReassociations(LSRUse &LU, unsigned LUIdx,
3678 void LSRInstance::GenerateCombinations(LSRUse &LU, unsigned LUIdx,
3741 void LSRInstance::GenerateSymbolicOffsetsImpl(LSRUse &LU, unsigned LUIdx,
3760 void LSRInstance::GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx,
3774 LSRUse &LU, unsigned LUIdx, const Formula &Base,
3812 if (FavorBackedgeIndex && LU.Kind == LSRUse::Address) {
3845 void LSRInstance::GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx,
3863 void LSRInstance::GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx,
3865 if (LU.Kind != LSRUse::ICmpZero) return;
3956 void LSRInstance::GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base) {
3977 if (LU.Kind == LSRUse::Basic &&
3978 isLegalUse(TTI, LU.MinOffset, LU.MaxOffset, LSRUse::Special,
3981 LU.Kind = LSRUse::Special;
3987 if (LU.Kind == LSRUse::ICmpZero &&
4022 void LSRInstance::GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base) {
4185 LSRUse &LU = Uses[LUIdx];
4276 LSRUse &LU = Uses[LUIdx];
4283 LSRUse &LU = Uses[LUIdx];
4294 LSRUse &LU = Uses[LUIdx];
4324 LSRUse &LU = Uses[LUIdx];
4412 for (const LSRUse &LU : Uses) {
4437 LSRUse &LU = Uses[LUIdx];
4504 LSRUse &LU = Uses[LUIdx];
4509 LSRUse *LUThatHas = FindUseWithSimilarFormula(F, LU);
4572 /// If a LSRUse has multiple formulae with the same ScaledReg and Scale.
4590 // Map the "Scale * ScaledReg" pair to the best formula of current LSRUse.
4601 LSRUse &LU = Uses[LUIdx];
4687 LSRUse &LU = Uses[LUIdx];
4689 if (LU.Kind != LSRUse::Address)
4782 for (const LSRUse &LU : Uses) {
4799 LSRUse &LU = Uses[LUIdx];
4888 assert(Best && "Failed to find best LSRUse candidate");
4897 LSRUse &LU = Uses[LUIdx];
4956 const LSRUse &LU = Uses[Workspace.size()];
4976 if (!TTI.shouldFavorPostInc() || LU.Kind != LSRUse::Address) {
5118 const LSRUse &LU,
5126 if (LU.Kind == LSRUse::ICmpZero)
5178 /// Emit instructions for the leading candidate expression for this LSRUse (this
5180 Value *LSRInstance::Expand(const LSRUse &LU, const LSRFixup &LF,
5230 if (LU.Kind == LSRUse::ICmpZero) {
5249 if (!Ops.empty() && LU.Kind == LSRUse::Address &&
5285 if (LU.Kind == LSRUse::ICmpZero) {
5321 if (LU.Kind == LSRUse::ICmpZero) {
5360 PHINode *PN, const LSRUse &LU, const LSRFixup &LF, const Formula &F,
5471 /// Emit instructions for the leading candidate expression for this LSRUse (this
5474 void LSRInstance::Rewrite(const LSRUse &LU, const LSRFixup &LF,
5499 if (LU.Kind == LSRUse::ICmpZero)
5654 for (const LSRUse &LU : Uses) {
5688 for (const LSRUse &LU : Uses)
5698 for (const LSRUse &LU : Uses) {