• Home
  • Raw
  • Download

Lines Matching refs:LUIdx

143   void CountRegister(const SCEV *Reg, size_t LUIdx);
144 void DropRegister(const SCEV *Reg, size_t LUIdx);
145 void SwapAndDropUse(size_t LUIdx, size_t LastLUIdx);
147 bool isRegUsedByUsesOtherThan(const SCEV *Reg, size_t LUIdx) const;
164 RegUseTracker::CountRegister(const SCEV *Reg, size_t LUIdx) { in CountRegister() argument
170 RSD.UsedByIndices.resize(std::max(RSD.UsedByIndices.size(), LUIdx + 1)); in CountRegister()
171 RSD.UsedByIndices.set(LUIdx); in CountRegister()
175 RegUseTracker::DropRegister(const SCEV *Reg, size_t LUIdx) { in DropRegister() argument
179 assert(RSD.UsedByIndices.size() > LUIdx); in DropRegister()
180 RSD.UsedByIndices.reset(LUIdx); in DropRegister()
184 RegUseTracker::SwapAndDropUse(size_t LUIdx, size_t LastLUIdx) { in SwapAndDropUse() argument
185 assert(LUIdx <= LastLUIdx); in SwapAndDropUse()
192 if (LUIdx < UsedByIndices.size()) in SwapAndDropUse()
193 UsedByIndices[LUIdx] = in SwapAndDropUse()
200 RegUseTracker::isRegUsedByUsesOtherThan(const SCEV *Reg, size_t LUIdx) const { in isRegUsedByUsesOtherThan()
207 if ((size_t)i != LUIdx) return true; in isRegUsedByUsesOtherThan()
279 bool hasRegsUsedByUsesOtherThan(size_t LUIdx,
442 bool Formula::hasRegsUsedByUsesOtherThan(size_t LUIdx, in hasRegsUsedByUsesOtherThan() argument
445 if (RegUses.isRegUsedByUsesOtherThan(ScaledReg, LUIdx)) in hasRegsUsedByUsesOtherThan()
449 if (RegUses.isRegUsedByUsesOtherThan(*I, LUIdx)) in hasRegsUsedByUsesOtherThan()
1105 size_t LUIdx; member
1123 : UserInst(nullptr), OperandValToReplace(nullptr), LUIdx(~size_t(0)), in LSRFixup()
1161 if (LUIdx != ~size_t(0)) in print()
1162 OS << ", LUIdx=" << LUIdx; in print()
1265 void RecomputeRegs(size_t LUIdx, RegUseTracker &Reguses);
1328 void LSRUse::RecomputeRegs(size_t LUIdx, RegUseTracker &RegUses) { in RecomputeRegs() argument
1343 RegUses.DropRegister(*I, LUIdx); in RecomputeRegs()
1728 void DeleteUse(LSRUse &LU, size_t LUIdx);
1732 void InsertInitialFormula(const SCEV *S, LSRUse &LU, size_t LUIdx);
1733 void InsertSupplementalFormula(const SCEV *S, LSRUse &LU, size_t LUIdx);
1734 void CountRegisters(const Formula &F, size_t LUIdx);
1735 bool InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F);
1739 void GenerateReassociations(LSRUse &LU, unsigned LUIdx, Formula Base,
1742 void GenerateReassociationsImpl(LSRUse &LU, unsigned LUIdx,
1745 void GenerateCombinations(LSRUse &LU, unsigned LUIdx, Formula Base);
1746 void GenerateSymbolicOffsetsImpl(LSRUse &LU, unsigned LUIdx,
1749 void GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
1750 void GenerateConstantOffsetsImpl(LSRUse &LU, unsigned LUIdx,
1754 void GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx, Formula Base);
1755 void GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx, Formula Base);
1756 void GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base);
1757 void GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base);
2305 size_t LUIdx = P.first->second; in getUse() local
2306 LSRUse &LU = Uses[LUIdx]; in getUse()
2309 return std::make_pair(LUIdx, Offset); in getUse()
2313 size_t LUIdx = Uses.size(); in getUse() local
2314 P.first->second = LUIdx; in getUse()
2316 LSRUse &LU = Uses[LUIdx]; in getUse()
2325 return std::make_pair(LUIdx, Offset); in getUse()
2329 void LSRInstance::DeleteUse(LSRUse &LU, size_t LUIdx) { in DeleteUse() argument
2335 RegUses.SwapAndDropUse(LUIdx, Uses.size()); in DeleteUse()
2344 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in FindUseWithSimilarFormula() local
2345 LSRUse &LU = Uses[LUIdx]; in FindUseWithSimilarFormula()
3045 LF.LUIdx = P.first; in CollectFixupsAndInitialFormulae()
3047 LSRUse &LU = Uses[LF.LUIdx]; in CollectFixupsAndInitialFormulae()
3056 InsertInitialFormula(S, LU, LF.LUIdx); in CollectFixupsAndInitialFormulae()
3057 CountRegisters(LU.Formulae.back(), LF.LUIdx); in CollectFixupsAndInitialFormulae()
3068 LSRInstance::InsertInitialFormula(const SCEV *S, LSRUse &LU, size_t LUIdx) { in InsertInitialFormula() argument
3075 bool Inserted = InsertFormula(LU, LUIdx, F); in InsertInitialFormula()
3083 LSRUse &LU, size_t LUIdx) { in InsertSupplementalFormula() argument
3087 bool Inserted = InsertFormula(LU, LUIdx, F); in InsertSupplementalFormula()
3093 void LSRInstance::CountRegisters(const Formula &F, size_t LUIdx) { in CountRegisters() argument
3095 RegUses.CountRegister(F.ScaledReg, LUIdx); in CountRegisters()
3098 RegUses.CountRegister(*I, LUIdx); in CountRegisters()
3103 bool LSRInstance::InsertFormula(LSRUse &LU, unsigned LUIdx, const Formula &F) { in InsertFormula() argument
3110 CountRegisters(F, LUIdx); in InsertFormula()
3184 LF.LUIdx = P.first; in CollectLoopInvariantFixupsAndFormulae()
3186 LSRUse &LU = Uses[LF.LUIdx]; in CollectLoopInvariantFixupsAndFormulae()
3192 InsertSupplementalFormula(US, LU, LF.LUIdx); in CollectLoopInvariantFixupsAndFormulae()
3263 void LSRInstance::GenerateReassociationsImpl(LSRUse &LU, unsigned LUIdx, in GenerateReassociationsImpl() argument
3338 if (InsertFormula(LU, LUIdx, F)) in GenerateReassociationsImpl()
3341 GenerateReassociations(LU, LUIdx, LU.Formulae.back(), Depth + 1); in GenerateReassociationsImpl()
3347 void LSRInstance::GenerateReassociations(LSRUse &LU, unsigned LUIdx, in GenerateReassociations() argument
3355 GenerateReassociationsImpl(LU, LUIdx, Base, Depth, i); in GenerateReassociations()
3358 GenerateReassociationsImpl(LU, LUIdx, Base, Depth, in GenerateReassociations()
3364 void LSRInstance::GenerateCombinations(LSRUse &LU, unsigned LUIdx, in GenerateCombinations() argument
3393 (void)InsertFormula(LU, LUIdx, F); in GenerateCombinations()
3399 void LSRInstance::GenerateSymbolicOffsetsImpl(LSRUse &LU, unsigned LUIdx, in GenerateSymbolicOffsetsImpl() argument
3414 (void)InsertFormula(LU, LUIdx, F); in GenerateSymbolicOffsetsImpl()
3418 void LSRInstance::GenerateSymbolicOffsets(LSRUse &LU, unsigned LUIdx, in GenerateSymbolicOffsets() argument
3424 GenerateSymbolicOffsetsImpl(LU, LUIdx, Base, i); in GenerateSymbolicOffsets()
3426 GenerateSymbolicOffsetsImpl(LU, LUIdx, Base, /* Idx */ -1, in GenerateSymbolicOffsets()
3432 LSRUse &LU, unsigned LUIdx, const Formula &Base, in GenerateConstantOffsetsImpl() argument
3457 (void)InsertFormula(LU, LUIdx, F); in GenerateConstantOffsetsImpl()
3472 (void)InsertFormula(LU, LUIdx, F); in GenerateConstantOffsetsImpl()
3476 void LSRInstance::GenerateConstantOffsets(LSRUse &LU, unsigned LUIdx, in GenerateConstantOffsets() argument
3486 GenerateConstantOffsetsImpl(LU, LUIdx, Base, Worklist, i); in GenerateConstantOffsets()
3488 GenerateConstantOffsetsImpl(LU, LUIdx, Base, Worklist, /* Idx */ -1, in GenerateConstantOffsets()
3494 void LSRInstance::GenerateICmpZeroScales(LSRUse &LU, unsigned LUIdx, in GenerateICmpZeroScales() argument
3576 (void)InsertFormula(LU, LUIdx, F); in GenerateICmpZeroScales()
3583 void LSRInstance::GenerateScales(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateScales() argument
3639 (void)InsertFormula(LU, LUIdx, F); in GenerateScales()
3646 void LSRInstance::GenerateTruncates(LSRUse &LU, unsigned LUIdx, Formula Base) { in GenerateTruncates() argument
3668 if (!F.hasRegsUsedByUsesOtherThan(LUIdx, RegUses)) in GenerateTruncates()
3671 (void)InsertFormula(LU, LUIdx, F); in GenerateTruncates()
3682 size_t LUIdx; member
3687 : LUIdx(LI), Imm(I), OrigReg(R) {} in WorkItem()
3696 OS << "in formulae referencing " << *OrigReg << " in use " << LUIdx in print()
3774 for (int LUIdx = UsedByIndices.find_first(); LUIdx != -1; in GenerateCrossUseConstantOffsets() local
3775 LUIdx = UsedByIndices.find_next(LUIdx)) in GenerateCrossUseConstantOffsets()
3777 if (UniqueItems.insert(std::make_pair(LUIdx, Imm))) in GenerateCrossUseConstantOffsets()
3778 WorkItems.push_back(WorkItem(LUIdx, Imm, OrigReg)); in GenerateCrossUseConstantOffsets()
3792 size_t LUIdx = WI.LUIdx; in GenerateCrossUseConstantOffsets() local
3793 LSRUse &LU = Uses[LUIdx]; in GenerateCrossUseConstantOffsets()
3835 (void)InsertFormula(LU, LUIdx, NewF); in GenerateCrossUseConstantOffsets()
3869 (void)InsertFormula(LU, LUIdx, NewF); in GenerateCrossUseConstantOffsets()
3883 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in GenerateAllReuseFormulae() local
3884 LSRUse &LU = Uses[LUIdx]; in GenerateAllReuseFormulae()
3886 GenerateReassociations(LU, LUIdx, LU.Formulae[i]); in GenerateAllReuseFormulae()
3888 GenerateCombinations(LU, LUIdx, LU.Formulae[i]); in GenerateAllReuseFormulae()
3890 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in GenerateAllReuseFormulae() local
3891 LSRUse &LU = Uses[LUIdx]; in GenerateAllReuseFormulae()
3893 GenerateSymbolicOffsets(LU, LUIdx, LU.Formulae[i]); in GenerateAllReuseFormulae()
3895 GenerateConstantOffsets(LU, LUIdx, LU.Formulae[i]); in GenerateAllReuseFormulae()
3897 GenerateICmpZeroScales(LU, LUIdx, LU.Formulae[i]); in GenerateAllReuseFormulae()
3899 GenerateScales(LU, LUIdx, LU.Formulae[i]); in GenerateAllReuseFormulae()
3901 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in GenerateAllReuseFormulae() local
3902 LSRUse &LU = Uses[LUIdx]; in GenerateAllReuseFormulae()
3904 GenerateTruncates(LU, LUIdx, LU.Formulae[i]); in GenerateAllReuseFormulae()
3930 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in FilterOutUndesirableDedicatedRegisters() local
3931 LSRUse &LU = Uses[LUIdx]; in FilterOutUndesirableDedicatedRegisters()
3965 if (RegUses.isRegUsedByUsesOtherThan(Reg, LUIdx)) in FilterOutUndesirableDedicatedRegisters()
3969 RegUses.isRegUsedByUsesOtherThan(F.ScaledReg, LUIdx)) in FilterOutUndesirableDedicatedRegisters()
4004 LU.RecomputeRegs(LUIdx, RegUses); in FilterOutUndesirableDedicatedRegisters()
4052 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in NarrowSearchSpaceByDetectingSupersets() local
4053 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByDetectingSupersets()
4096 LU.RecomputeRegs(LUIdx, RegUses); in NarrowSearchSpaceByDetectingSupersets()
4117 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in NarrowSearchSpaceByCollapsingUnrolledCode() local
4118 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByCollapsingUnrolledCode()
4141 if (Fixup.LUIdx == LUIdx) { in NarrowSearchSpaceByCollapsingUnrolledCode()
4142 Fixup.LUIdx = LUThatHas - &Uses.front(); in NarrowSearchSpaceByCollapsingUnrolledCode()
4154 if (Fixup.LUIdx == NumUses-1) in NarrowSearchSpaceByCollapsingUnrolledCode()
4155 Fixup.LUIdx = LUIdx; in NarrowSearchSpaceByCollapsingUnrolledCode()
4177 DeleteUse(LU, LUIdx); in NarrowSearchSpaceByCollapsingUnrolledCode()
4178 --LUIdx; in NarrowSearchSpaceByCollapsingUnrolledCode()
4243 for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { in NarrowSearchSpaceByPickingWinnerRegs() local
4244 LSRUse &LU = Uses[LUIdx]; in NarrowSearchSpaceByPickingWinnerRegs()
4262 LU.RecomputeRegs(LUIdx, RegUses); in NarrowSearchSpaceByPickingWinnerRegs()
4528 const LSRUse &LU = Uses[LF.LUIdx]; in Expand()
4810 if (Uses[LF.LUIdx].Kind == LSRUse::ICmpZero) in Rewrite()
4848 Rewrite(Fixup, *Solution[Fixup.LUIdx], Rewriter, DeadInsts, P); in ImplementSolution()