Lines Matching defs:Bucket

160     cl::desc("Bucket number per loop for PPC loop chain common"));
193 struct Bucket {
194 Bucket(const SCEV *B, Instruction *I)
268 bool chainCommoning(Loop *L, SmallVector<Bucket, 16> &Buckets);
271 bool prepareBasesForCommoningChains(Bucket &BucketChain);
275 rewriteLoadStoresForCommoningChains(Loop *L, Bucket &Bucket,
280 SmallVector<Bucket, 16> collectCandidates(
290 SmallVector<Bucket, 16> &Buckets,
295 bool updateFormPrep(Loop *L, SmallVector<Bucket, 16> &Buckets);
299 bool dispFormPrep(Loop *L, SmallVector<Bucket, 16> &Buckets, PrepForm Form);
307 bool prepareBaseForDispFormChain(Bucket &BucketChain, PrepForm Form);
314 bool prepareBaseForUpdateFormChain(Bucket &BucketChain);
318 bool rewriteLoadStores(Loop *L, Bucket &BucketChain,
427 bool PPCLoopInstrFormPrep::prepareBasesForCommoningChains(Bucket &CBucket) {
521 LLVM_DEBUG(dbgs() << "Bucket has " << ChainNum << " chains.\n");
527 SmallVector<Bucket, 16> &Buckets) {
535 for (auto &Bucket : Buckets) {
536 if (prepareBasesForCommoningChains(Bucket))
537 MadeChange |= rewriteLoadStoresForCommoningChains(L, Bucket, BBChanged);
547 Loop *L, Bucket &Bucket, SmallSet<BasicBlock *, 16> &BBChanged) {
550 assert(Bucket.Elements.size() ==
551 Bucket.ChainBases.size() * Bucket.ChainSize &&
561 for (unsigned ChainIdx = 0; ChainIdx < Bucket.ChainBases.size(); ++ChainIdx) {
562 unsigned BaseElemIdx = Bucket.ChainSize * ChainIdx;
564 ChainIdx ? SE->getAddExpr(Bucket.BaseSCEV,
565 Bucket.Elements[BaseElemIdx].Offset)
566 : Bucket.BaseSCEV;
577 L, BasePtrSCEV, Bucket.Elements[BaseElemIdx].Instr,
588 for (unsigned Idx = BaseElemIdx + 1; Idx < BaseElemIdx + Bucket.ChainSize;
590 BucketElement &I = Bucket.Elements[Idx];
597 BaseElemIdx ? SE->getMinusSCEV(Bucket.Elements[Idx].Offset,
598 Bucket.Elements[BaseElemIdx].Offset)
599 : Bucket.Elements[Idx].Offset;
610 Instruction *NewPtr = rewriteForBucketElement(Base, Bucket.Elements[Idx],
834 Instruction *MemI, const SCEV *LSCEV, SmallVector<Bucket, 16> &Buckets,
859 Buckets.push_back(Bucket(LSCEV, MemI));
863 SmallVector<Bucket, 16> PPCLoopInstrFormPrep::collectCandidates(
868 SmallVector<Bucket, 16> Buckets;
899 bool PPCLoopInstrFormPrep::prepareBaseForDispFormChain(Bucket &BucketChain,
975 bool PPCLoopInstrFormPrep::prepareBaseForUpdateFormChain(Bucket &BucketChain) {
1016 Loop *L, Bucket &BucketChain, SmallSet<BasicBlock *, 16> &BBChanged,
1095 SmallVector<Bucket, 16> &Buckets) {
1100 for (auto &Bucket : Buckets)
1103 if (prepareBaseForUpdateFormChain(Bucket))
1104 MadeChange |= rewriteLoadStores(L, Bucket, BBChanged, UpdateForm);
1113 SmallVector<Bucket, 16> &Buckets,
1121 for (auto &Bucket : Buckets) {
1122 if (Bucket.Elements.size() < DispFormPrepMinThreshold)
1124 if (prepareBaseForDispFormChain(Bucket, Form))
1125 MadeChange |= rewriteLoadStores(L, Bucket, BBChanged, Form);
1444 SmallVector<Bucket, 16> UpdateFormBuckets = collectCandidates(
1461 SmallVector<Bucket, 16> DSFormBuckets = collectCandidates(
1471 SmallVector<Bucket, 16> DQFormBuckets = collectCandidates(
1487 SmallVector<Bucket, 16> Buckets =