Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
Show First 20 Lines • Show All 1,534 Lines • ▼ Show 20 Lines | MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx, | ||||
MaxSafeDepDistBytes = | MaxSafeDepDistBytes = | ||||
std::min(static_cast<uint64_t>(Distance), MaxSafeDepDistBytes); | std::min(static_cast<uint64_t>(Distance), MaxSafeDepDistBytes); | ||||
bool IsTrueDataDependence = (!AIsWrite && BIsWrite); | bool IsTrueDataDependence = (!AIsWrite && BIsWrite); | ||||
if (IsTrueDataDependence && EnableForwardingConflictDetection && | if (IsTrueDataDependence && EnableForwardingConflictDetection && | ||||
couldPreventStoreLoadForward(Distance, TypeByteSize)) | couldPreventStoreLoadForward(Distance, TypeByteSize)) | ||||
return Dependence::BackwardVectorizableButPreventsForwarding; | return Dependence::BackwardVectorizableButPreventsForwarding; | ||||
uint64_t MaxVF = MaxSafeDepDistBytes / (TypeByteSize * Stride); | |||||
DEBUG(dbgs() << "LAA: Positive distance " << Val.getSExtValue() | DEBUG(dbgs() << "LAA: Positive distance " << Val.getSExtValue() | ||||
<< " with max VF = " | << " with max VF = " << MaxVF << '\n'); | ||||
<< MaxSafeDepDistBytes / (TypeByteSize * Stride) << '\n'); | uint64_t MaxVFInBits = MaxVF * TypeByteSize * 8; | ||||
MaxSafeRegisterWidth = std::min(MaxSafeRegisterWidth, MaxVFInBits); | |||||
return Dependence::BackwardVectorizable; | return Dependence::BackwardVectorizable; | ||||
} | } | ||||
bool MemoryDepChecker::areDepsSafe(DepCandidates &AccessSets, | bool MemoryDepChecker::areDepsSafe(DepCandidates &AccessSets, | ||||
MemAccessInfoList &CheckDeps, | MemAccessInfoList &CheckDeps, | ||||
const ValueToValueMap &Strides) { | const ValueToValueMap &Strides) { | ||||
MaxSafeDepDistBytes = -1; | MaxSafeDepDistBytes = -1; | ||||
▲ Show 20 Lines • Show All 706 Lines • Show Last 20 Lines |