unsigned MaxSafeDepDist = -1U;
if (Legal->getMaxSafeDepDistBytes() != -1U)
MaxSafeDepDist = Legal->getMaxSafeDepDistBytes() * 8;
- const DataLayout &DL = TheFunction->getParent()->getDataLayout();
SmallVector<RegisterUsage, 8> RUs(VFs.size());
SmallVector<SmallMapVector<unsigned, unsigned, 4>, 8> MaxUsages(VFs.size());
LLVM_DEBUG(dbgs() << "LV(REG): Calculating max register usage:\n");
// A lambda that gets the register usage for the given type and VF.
- auto GetRegUsage = [&DL, &TTI=TTI](Type *Ty, ElementCount VF) {
+ auto GetRegUsage = [&TTI=TTI](Type *Ty, ElementCount VF) {
if (Ty->isTokenTy())
return 0U;
return TTI.getRegUsageForType(VectorType::get(Ty, VF));