LLVM  14.0.0git
Macros | Functions | Variables
DependenceAnalysis.cpp File Reference
#include "llvm/Analysis/DependenceAnalysis.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/Delinearization.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for DependenceAnalysis.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "da"
 

Functions

 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")
 
 INITIALIZE_PASS_BEGIN (DependenceAnalysisWrapperPass, "da", "Dependence Analysis", true, true) INITIALIZE_PASS_END(DependenceAnalysisWrapperPass
 
static void dumpExampleDependence (raw_ostream &OS, DependenceInfo *DA)
 
static AliasResult underlyingObjectsAlias (AAResults *AA, const DataLayout &DL, const MemoryLocation &LocA, const MemoryLocation &LocB)
 
static bool isLoadOrStore (const Instruction *I)
 
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 bool isRemainderZero (const SCEVConstant *Dividend, const SCEVConstant *Divisor)
 
static const SCEVConstantgetConstantPart (const SCEV *Expr)
 
static void dumpSmallBitVector (SmallBitVector &BV)
 

Variables

static cl::opt< bool > Delinearize ("da-delinearize", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Try to delinearize array references."))
 
static cl::opt< bool > DisableDelinearizationChecks ("da-disable-delinearization-checks", cl::init(false), cl::Hidden, cl::ZeroOrMore, 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::ZeroOrMore, cl::desc("Maximum depth allowed for the recursive algorithm used to " "explore MIV direction vectors."))
 
 da
 
Dependence Analysis
 
Dependence true
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "da"

Definition at line 73 of file DependenceAnalysis.cpp.

Function Documentation

◆ ceilingOfQuotient()

static APInt ceilingOfQuotient ( const APInt A,
const APInt B 
)
static

Definition at line 1455 of file DependenceAnalysis.cpp.

References B, and llvm::APInt::sdivrem().

◆ dumpExampleDependence()

static void dumpExampleDependence ( raw_ostream OS,
DependenceInfo DA 
)
static

◆ dumpSmallBitVector()

static void dumpSmallBitVector ( SmallBitVector BV)
static

◆ findGCD()

static bool findGCD ( unsigned  Bits,
const APInt AM,
const APInt BM,
const APInt Delta,
APInt G,
APInt X,
APInt Y 
)
static

◆ floorOfQuotient()

static APInt floorOfQuotient ( const APInt A,
const APInt B 
)
static

Definition at line 1442 of file DependenceAnalysis.cpp.

References B, and llvm::APInt::sdivrem().

◆ getConstantPart()

static const SCEVConstant* getConstantPart ( const SCEV Expr)
static

Definition at line 2295 of file DependenceAnalysis.cpp.

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( DependenceAnalysisWrapperPass  ,
"da"  ,
"Dependence Analysis ,
true  ,
true   
)

◆ isLoadOrStore()

static bool isLoadOrStore ( const Instruction I)
static

Definition at line 691 of file DependenceAnalysis.cpp.

References I, and SI.

Referenced by llvm::DependenceInfo::depends(), and llvm::DependenceInfo::getSplitIteration().

◆ isRemainderZero()

static bool isRemainderZero ( const SCEVConstant Dividend,
const SCEVConstant Divisor 
)
static

Definition at line 1641 of file DependenceAnalysis.cpp.

References llvm::SCEVConstant::getAPInt(), and llvm::APInt::srem().

◆ STATISTIC() [1/32]

STATISTIC ( BanerjeeApplications  ,
"Banerjee applications"   
)

◆ STATISTIC() [2/32]

STATISTIC ( BanerjeeIndependence  ,
"Banerjee independence"   
)

◆ STATISTIC() [3/32]

STATISTIC ( BanerjeeSuccesses  ,
"Banerjee successes"   
)

◆ STATISTIC() [4/32]

STATISTIC ( CoupledSubscriptPairs  ,
"Coupled subscript pairs  
)

◆ STATISTIC() [5/32]

STATISTIC ( DeltaApplications  ,
"Delta applications"   
)

◆ STATISTIC() [6/32]

STATISTIC ( DeltaIndependence  ,
"Delta independence"   
)

◆ STATISTIC() [7/32]

STATISTIC ( DeltaPropagations  ,
"Delta propagations"   
)

◆ STATISTIC() [8/32]

STATISTIC ( DeltaSuccesses  ,
"Delta successes"   
)

◆ STATISTIC() [9/32]

STATISTIC ( ExactRDIVapplications  ,
"Exact RDIV applications"   
)

◆ STATISTIC() [10/32]

STATISTIC ( ExactRDIVindependence  ,
"Exact RDIV independence"   
)

◆ STATISTIC() [11/32]

STATISTIC ( ExactSIVapplications  ,
"Exact SIV applications"   
)

◆ STATISTIC() [12/32]

STATISTIC ( ExactSIVindependence  ,
"Exact SIV independence"   
)

◆ STATISTIC() [13/32]

STATISTIC ( ExactSIVsuccesses  ,
"Exact SIV successes"   
)

◆ STATISTIC() [14/32]

STATISTIC ( GCDapplications  ,
"GCD applications"   
)

◆ STATISTIC() [15/32]

STATISTIC ( GCDindependence  ,
"GCD independence"   
)

◆ STATISTIC() [16/32]

STATISTIC ( GCDsuccesses  ,
"GCD successes"   
)

◆ STATISTIC() [17/32]

STATISTIC ( NonlinearSubscriptPairs  ,
"Nonlinear subscript pairs  
)

◆ STATISTIC() [18/32]

STATISTIC ( SeparableSubscriptPairs  ,
"Separable subscript pairs  
)

◆ STATISTIC() [19/32]

STATISTIC ( StrongSIVapplications  ,
"Strong SIV applications"   
)

◆ STATISTIC() [20/32]

STATISTIC ( StrongSIVindependence  ,
"Strong SIV independence"   
)

◆ STATISTIC() [21/32]

STATISTIC ( StrongSIVsuccesses  ,
"Strong SIV successes"   
)

◆ STATISTIC() [22/32]

STATISTIC ( SymbolicRDIVapplications  ,
"Symbolic RDIV applications"   
)

◆ STATISTIC() [23/32]

STATISTIC ( SymbolicRDIVindependence  ,
"Symbolic RDIV independence"   
)

◆ STATISTIC() [24/32]

STATISTIC ( TotalArrayPairs  ,
"Array pairs tested"   
)

◆ STATISTIC() [25/32]

STATISTIC ( WeakCrossingSIVapplications  ,
"Weak-Crossing SIV applications"   
)

◆ STATISTIC() [26/32]

STATISTIC ( WeakCrossingSIVindependence  ,
"Weak-Crossing SIV independence"   
)

◆ STATISTIC() [27/32]

STATISTIC ( WeakCrossingSIVsuccesses  ,
"Weak-Crossing SIV successes"   
)

◆ STATISTIC() [28/32]

STATISTIC ( WeakZeroSIVapplications  ,
"Weak-Zero SIV applications"   
)

◆ STATISTIC() [29/32]

STATISTIC ( WeakZeroSIVindependence  ,
"Weak-Zero SIV independence"   
)

◆ STATISTIC() [30/32]

STATISTIC ( WeakZeroSIVsuccesses  ,
"Weak-Zero SIV successes"   
)

◆ STATISTIC() [31/32]

STATISTIC ( ZIVapplications  ,
"ZIV applications"   
)

◆ STATISTIC() [32/32]

STATISTIC ( ZIVindependence  ,
"ZIV independence"   
)

◆ underlyingObjectsAlias()

static AliasResult underlyingObjectsAlias ( AAResults AA,
const DataLayout DL,
const MemoryLocation LocA,
const MemoryLocation LocB 
)
static

Variable Documentation

◆ Analysis

Dependence Analysis

Definition at line 146 of file DependenceAnalysis.cpp.

◆ da

da

Definition at line 146 of file DependenceAnalysis.cpp.

◆ Delinearize

cl::opt<bool> Delinearize("da-delinearize", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Try to delinearize array references."))
static

◆ DisableDelinearizationChecks

cl::opt<bool> DisableDelinearizationChecks("da-disable-delinearization-checks", cl::init(false), cl::Hidden, cl::ZeroOrMore, 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

◆ MIVMaxLevelThreshold

cl::opt<unsigned> MIVMaxLevelThreshold("da-miv-max-level-threshold", cl::init(7), cl::Hidden, cl::ZeroOrMore, cl::desc("Maximum depth allowed for the recursive algorithm used to " "explore MIV direction vectors."))
static

◆ true

Dependence true

Definition at line 147 of file DependenceAnalysis.cpp.