private:
PPCTargetMachine *TM = nullptr;
- const PPCSubtarget *ST;
+ const PPCSubtarget *ST;
DominatorTree *DT;
LoopInfo *LI;
ScalarEvolution *SE;
bool runOnLoop(Loop *L);
/// Check if required PHI node is already exist in Loop \p L.
- bool alreadyPrepared(Loop *L, Instruction* MemI,
+ bool alreadyPrepared(Loop *L, Instruction *MemI,
const SCEV *BasePtrStartSCEV,
const SCEVConstant *BasePtrIncSCEV,
InstrForm Form);
if (I->hasName())
return (I->getName() + Suffix).str();
else
- return "";
+ return "";
}
static Value *GetPointerOperand(Value *MemI) {
// contains following load/stores with different remainders:
// 1: 10 load/store whose remainder is 1;
// 2: 9 load/store whose remainder is 2;
- // 3: 1 for remainder 3 and 0 for remainder 0;
+ // 3: 1 for remainder 3 and 0 for remainder 0;
// Now we will choose the first load/store whose remainder is 1 as base and
// adjust all other load/stores according to new base, so we will get 10 DS
// form and 10 X form.
// But we should be more clever, for this case we could use two bases, one for
- // remainder 1 and the other for remainder 2, thus we could get 19 DS form and 1
- // X form.
+ // remainder 1 and the other for remainder 2, thus we could get 19 DS form and
+ // 1 X form.
unsigned MaxCountRemainder = 0;
for (unsigned j = 0; j < (unsigned)Form; j++)
if ((RemainderOffsetInfo.find(j) != RemainderOffsetInfo.end()) &&
MadeChange = true;
- SuccPrepCount++;
+ SuccPrepCount++;
if (Form == DSForm && !CanPreInc)
DSFormChainRewritten++;
// This function will check to see if that PHI already exists and will return
// true if it found an existing PHI with the matched start and increment as the
// one we wanted to create.
-bool PPCLoopInstrFormPrep::alreadyPrepared(Loop *L, Instruction* MemI,
+bool PPCLoopInstrFormPrep::alreadyPrepared(Loop *L, Instruction *MemI,
const SCEV *BasePtrStartSCEV,
const SCEVConstant *BasePtrIncSCEV,
InstrForm Form) {
PHIBasePtrSCEV->getStart() == BasePtrStartSCEV) {
++PHINodeAlreadyExistsUpdate;
return true;
- }
+ }
if (Form == DSForm || Form == DQForm) {
const SCEVConstant *Diff = dyn_cast<SCEVConstant>(
SE->getMinusSCEV(PHIBasePtrSCEV->getStart(), BasePtrStartSCEV));
++PHINodeAlreadyExistsDQ;
return true;
}
- }
+ }
}
}
}
return ST && ST->hasP9Vector() && (PointerElementType->isVectorTy());
};
- // intrinsic for update form.
+ // Collect buckets of comparable addresses used by loads and stores for update
+ // form.
SmallVector<Bucket, 16> UpdateFormBuckets =
collectCandidates(L, isUpdateFormCandidate, MaxVarsUpdateForm);