emitAnalysisDiag(TheFunction, TheLoop, *Hints, Message);
}
+ ValueToValueMap &getSymbolicStrides() { return SymbolicStrides; }
+
unsigned NumPredStores;
/// The loop that we evaluate.
/// Used to emit an analysis of any legality issues.
LoopVectorizeHints *Hints;
- ValueToValueMap Strides;
+ ValueToValueMap SymbolicStrides;
SmallPtrSet<Value *, 8> StrideSet;
/// While vectorizing these instructions we have to generate a
// We can emit wide load/stores only if the last non-zero index is the
// induction variable.
const SCEV *Last = nullptr;
- if (!Strides.count(Gep))
+ if (!getSymbolicStrides().count(Gep))
Last = PSE.getSCEV(Gep->getOperand(InductionOperand));
else {
// Because of the multiplication by a stride we can have a s/zext cast.
// %idxprom = zext i32 %mul to i64 << Safe cast.
// %arrayidx = getelementptr inbounds i32* %B, i64 %idxprom
//
- Last = replaceSymbolicStrideSCEV(PSE, Strides,
+ Last = replaceSymbolicStrideSCEV(PSE, getSymbolicStrides(),
Gep->getOperand(InductionOperand), Gep);
if (const SCEVCastExpr *C = dyn_cast<SCEVCastExpr>(Last))
Last =
// Analyze interleaved memory accesses.
if (UseInterleaved)
- InterleaveInfo.analyzeInterleaving(Strides);
+ InterleaveInfo.analyzeInterleaving(getSymbolicStrides());
unsigned SCEVThreshold = VectorizeSCEVCheckThreshold;
if (Hints->getForce() == LoopVectorizeHints::FK_Enabled)
DEBUG(dbgs() << "LV: Found a strided access that we can version");
DEBUG(dbgs() << " Ptr: " << *Ptr << " Stride: " << *Stride << "\n");
- Strides[Ptr] = Stride;
+ SymbolicStrides[Ptr] = Stride;
StrideSet.insert(Stride);
}
}
bool LoopVectorizationLegality::canVectorizeMemory() {
- LAI = &LAA->getInfo(TheLoop, Strides);
+ LAI = &LAA->getInfo(TheLoop, getSymbolicStrides());
auto &OptionalReport = LAI->getReport();
if (OptionalReport)
emitAnalysis(VectorizationReport(*OptionalReport));