Lines Matching defs:Bucket
162 cl::desc("Bucket number per loop for PPC loop chain common"));
195 struct Bucket {
196 Bucket(const SCEV *B, Instruction *I)
270 bool chainCommoning(Loop *L, SmallVector<Bucket, 16> &Buckets);
273 bool prepareBasesForCommoningChains(Bucket &BucketChain);
277 rewriteLoadStoresForCommoningChains(Loop *L, Bucket &Bucket,
282 SmallVector<Bucket, 16> collectCandidates(
292 SmallVector<Bucket, 16> &Buckets,
297 bool updateFormPrep(Loop *L, SmallVector<Bucket, 16> &Buckets);
301 bool dispFormPrep(Loop *L, SmallVector<Bucket, 16> &Buckets, PrepForm Form);
309 bool prepareBaseForDispFormChain(Bucket &BucketChain, PrepForm Form);
316 bool prepareBaseForUpdateFormChain(Bucket &BucketChain);
320 bool rewriteLoadStores(Loop *L, Bucket &BucketChain,
429 bool PPCLoopInstrFormPrep::prepareBasesForCommoningChains(Bucket &CBucket) {
523 LLVM_DEBUG(dbgs() << "Bucket has " << ChainNum << " chains.\n");
529 SmallVector<Bucket, 16> &Buckets) {
537 for (auto &Bucket : Buckets) {
538 if (prepareBasesForCommoningChains(Bucket))
539 MadeChange |= rewriteLoadStoresForCommoningChains(L, Bucket, BBChanged);
549 Loop *L, Bucket &Bucket, SmallSet<BasicBlock *, 16> &BBChanged) {
552 assert(Bucket.Elements.size() ==
553 Bucket.ChainBases.size() * Bucket.ChainSize &&
563 for (unsigned ChainIdx = 0; ChainIdx < Bucket.ChainBases.size(); ++ChainIdx) {
564 unsigned BaseElemIdx = Bucket.ChainSize * ChainIdx;
566 ChainIdx ? SE->getAddExpr(Bucket.BaseSCEV,
567 Bucket.Elements[BaseElemIdx].Offset)
568 : Bucket.BaseSCEV;
579 L, BasePtrSCEV, Bucket.Elements[BaseElemIdx].Instr,
590 for (unsigned Idx = BaseElemIdx + 1; Idx < BaseElemIdx + Bucket.ChainSize;
592 BucketElement &I = Bucket.Elements[Idx];
599 BaseElemIdx ? SE->getMinusSCEV(Bucket.Elements[Idx].Offset,
600 Bucket.Elements[BaseElemIdx].Offset)
601 : Bucket.Elements[Idx].Offset;
612 Instruction *NewPtr = rewriteForBucketElement(Base, Bucket.Elements[Idx],
836 Instruction *MemI, const SCEV *LSCEV, SmallVector<Bucket, 16> &Buckets,
861 Buckets.push_back(Bucket(LSCEV, MemI));
865 SmallVector<Bucket, 16> PPCLoopInstrFormPrep::collectCandidates(
870 SmallVector<Bucket, 16> Buckets;
901 bool PPCLoopInstrFormPrep::prepareBaseForDispFormChain(Bucket &BucketChain,
977 bool PPCLoopInstrFormPrep::prepareBaseForUpdateFormChain(Bucket &BucketChain) {
1018 Loop *L, Bucket &BucketChain, SmallSet<BasicBlock *, 16> &BBChanged,
1097 SmallVector<Bucket, 16> &Buckets) {
1102 for (auto &Bucket : Buckets)
1105 if (prepareBaseForUpdateFormChain(Bucket))
1106 MadeChange |= rewriteLoadStores(L, Bucket, BBChanged, UpdateForm);
1115 SmallVector<Bucket, 16> &Buckets,
1123 for (auto &Bucket : Buckets) {
1124 if (Bucket.Elements.size() < DispFormPrepMinThreshold)
1126 if (prepareBaseForDispFormChain(Bucket, Form))
1127 MadeChange |= rewriteLoadStores(L, Bucket, BBChanged, Form);
1446 SmallVector<Bucket, 16> UpdateFormBuckets = collectCandidates(
1463 SmallVector<Bucket, 16> DSFormBuckets = collectCandidates(
1473 SmallVector<Bucket, 16> DQFormBuckets = collectCandidates(
1489 SmallVector<Bucket, 16> Buckets =