|
| STATISTIC (TotalArrayPairs, "Array pairs tested") |
| STATISTIC (SeparableSubscriptPairs, "Separable subscript pairs") |
| STATISTIC (CoupledSubscriptPairs, "Coupled subscript pairs") |
| STATISTIC (NonlinearSubscriptPairs, "Nonlinear subscript pairs") |
| STATISTIC (ZIVapplications, "ZIV applications") |
| STATISTIC (ZIVindependence, "ZIV independence") |
| STATISTIC (StrongSIVapplications, "Strong SIV applications") |
| STATISTIC (StrongSIVsuccesses, "Strong SIV successes") |
| STATISTIC (StrongSIVindependence, "Strong SIV independence") |
| STATISTIC (WeakCrossingSIVapplications, "Weak-Crossing SIV applications") |
| STATISTIC (WeakCrossingSIVsuccesses, "Weak-Crossing SIV successes") |
| STATISTIC (WeakCrossingSIVindependence, "Weak-Crossing SIV independence") |
| STATISTIC (ExactSIVapplications, "Exact SIV applications") |
| STATISTIC (ExactSIVsuccesses, "Exact SIV successes") |
| STATISTIC (ExactSIVindependence, "Exact SIV independence") |
| STATISTIC (WeakZeroSIVapplications, "Weak-Zero SIV applications") |
| STATISTIC (WeakZeroSIVsuccesses, "Weak-Zero SIV successes") |
| STATISTIC (WeakZeroSIVindependence, "Weak-Zero SIV independence") |
| STATISTIC (ExactRDIVapplications, "Exact RDIV applications") |
| STATISTIC (ExactRDIVindependence, "Exact RDIV independence") |
| STATISTIC (SymbolicRDIVapplications, "Symbolic RDIV applications") |
| STATISTIC (SymbolicRDIVindependence, "Symbolic RDIV independence") |
| STATISTIC (DeltaApplications, "Delta applications") |
| STATISTIC (DeltaSuccesses, "Delta successes") |
| STATISTIC (DeltaIndependence, "Delta independence") |
| STATISTIC (DeltaPropagations, "Delta propagations") |
| STATISTIC (GCDapplications, "GCD applications") |
| STATISTIC (GCDsuccesses, "GCD successes") |
| STATISTIC (GCDindependence, "GCD independence") |
| STATISTIC (BanerjeeApplications, "Banerjee applications") |
| STATISTIC (BanerjeeIndependence, "Banerjee independence") |
| STATISTIC (BanerjeeSuccesses, "Banerjee successes") |
| STATISTIC (SameSDLoopsCount, "Loops with Same iteration Space and Depth") |
| INITIALIZE_PASS_BEGIN (DependenceAnalysisWrapperPass, "da", "Dependence Analysis", true, true) INITIALIZE_PASS_END(DependenceAnalysisWrapperPass |
static void | dumpExampleDependence (raw_ostream &OS, DependenceInfo *DA, ScalarEvolution &SE, LoopInfo &LI, bool NormalizeResults) |
static AliasResult | underlyingObjectsAlias (AAResults *AA, const DataLayout &DL, const MemoryLocation &LocA, const MemoryLocation &LocB) |
static bool | isLoadOrStore (const Instruction *I) |
static const SCEV * | minusSCEVNoSignedOverflow (const SCEV *A, const SCEV *B, ScalarEvolution &SE) |
| Returns A - B if it guaranteed not to signed wrap.
|
static bool | isDependenceTestEnabled (DependenceTestType Test) |
| Returns true iff Test is enabled.
|
static bool | findGCD (unsigned Bits, const APInt &AM, const APInt &BM, const APInt &Delta, APInt &G, APInt &X, APInt &Y) |
static APInt | floorOfQuotient (const APInt &A, const APInt &B) |
static APInt | ceilingOfQuotient (const APInt &A, const APInt &B) |
static std::pair< std::optional< APInt >, std::optional< APInt > > | inferDomainOfAffine (const APInt &A, const APInt &B, const std::optional< APInt > &UB) |
| Given an affine expression of the form A*k + B, where k is an arbitrary integer, infer the possible range of k based on the known range of the affine expression.
|
static bool | isRemainderZero (const SCEVConstant *Dividend, const SCEVConstant *Divisor) |
static std::optional< APInt > | getConstantPart (const SCEV *Expr) |
static void | dumpSmallBitVector (SmallBitVector &BV) |
|
static cl::opt< bool > | Delinearize ("da-delinearize", cl::init(true), cl::Hidden, cl::desc("Try to delinearize array references.")) |
static cl::opt< bool > | DisableDelinearizationChecks ("da-disable-delinearization-checks", cl::Hidden, cl::desc("Disable checks that try to statically verify validity of " "delinearized subscripts. Enabling this option may result in incorrect " "dependence vectors for languages that allow the subscript of one " "dimension to underflow or overflow into another dimension.")) |
static cl::opt< unsigned > | MIVMaxLevelThreshold ("da-miv-max-level-threshold", cl::init(7), cl::Hidden, cl::desc("Maximum depth allowed for the recursive algorithm used to " "explore MIV direction vectors.")) |
static cl::opt< DependenceTestType > | EnableDependenceTest ("da-enable-dependence-test", cl::init(DependenceTestType::All), cl::ReallyHidden, cl::desc("Run only specified dependence test routine and disable others. " "The purpose is mainly to exclude the influence of other " "dependence test routines in regression tests. If set to All, all " "dependence test routines are enabled."), cl::values(clEnumValN(DependenceTestType::All, "all", "Enable all dependence test routines."), clEnumValN(DependenceTestType::StrongSIV, "strong-siv", "Enable only Strong SIV test."), clEnumValN(DependenceTestType::WeakCrossingSIV, "weak-crossing-siv", "Enable only Weak-Crossing SIV test."), clEnumValN(DependenceTestType::ExactSIV, "exact-siv", "Enable only Exact SIV test."), clEnumValN(DependenceTestType::WeakZeroSIV, "weak-zero-siv", "Enable only Weak-Zero SIV test."), clEnumValN(DependenceTestType::ExactRDIV, "exact-rdiv", "Enable only Exact RDIV test."), clEnumValN(DependenceTestType::SymbolicRDIV, "symbolic-rdiv", "Enable only Symbolic RDIV test."), clEnumValN(DependenceTestType::GCDMIV, "gcd-miv", "Enable only GCD MIV test."), clEnumValN(DependenceTestType::BanerjeeMIV, "banerjee-miv", "Enable only Banerjee MIV test."))) |
static cl::opt< bool > | EnableMonotonicityCheck ("da-enable-monotonicity-check", cl::init(false), cl::Hidden, cl::desc("Check if the subscripts are monotonic. If it's not, dependence " "is reported as unknown.")) |
static cl::opt< bool > | DumpMonotonicityReport ("da-dump-monotonicity-report", cl::init(false), cl::Hidden, cl::desc("When printing analysis, dump the results of monotonicity checks.")) |
| da |
Dependence | Analysis |
Dependence | true |
Given an affine expression of the form A*k + B, where k is an arbitrary integer, infer the possible range of k based on the known range of the affine expression.
If we know A*k + B is non-negative, i.e.,
A*k + B >= 0
we can derive the following inequalities for k when A is positive:
k >= -B / A
Since k is an integer, it means k is greater than or equal to the ceil(-B / A).
If the upper bound of the affine expression UB
is passed, the following inequality can be derived as well:
A*k + B <= UB
which leads to:
k <= (UB - B) / A
Again, as k is an integer, it means k is less than or equal to the floor((UB - B) / A).
The similar logic applies when A is negative, but the inequalities sign flip while working with them.
Preconditions: A
is non-zero, and we know A*k + B is non-negative.
Definition at line 2000 of file DependenceAnalysis.cpp.
References A(), assert(), B(), ceilingOfQuotient(), llvm::dbgs(), floorOfQuotient(), and LLVM_DEBUG.