LLVM  8.0.1
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/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/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 (AliasAnalysis *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 APInt maxAPInt (APInt A, APInt B)
 
static APInt minAPInt (APInt A, 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< boolDelinearize ("da-delinearize", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Try to delinearize array references."))
 
 da
 
Dependence Analysis
 
Dependence true
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "da"

Definition at line 72 of file DependenceAnalysis.cpp.

Function Documentation

◆ ceilingOfQuotient()

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

Definition at line 1445 of file DependenceAnalysis.cpp.

References llvm::APInt::sdivrem(), llvm::APInt::sgt(), and llvm::APInt::slt().

Referenced by isRemainderZero(), and minAPInt().

◆ 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 1432 of file DependenceAnalysis.cpp.

References llvm::APInt::sdivrem(), llvm::APInt::sgt(), and llvm::APInt::slt().

Referenced by isRemainderZero(), and minAPInt().

◆ getConstantPart()

static const SCEVConstant* getConstantPart ( const SCEV Expr)
static

◆ INITIALIZE_PASS_BEGIN()

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

◆ isLoadOrStore()

static bool isLoadOrStore ( const Instruction I)
static

◆ isRemainderZero()

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

◆ maxAPInt()

static APInt maxAPInt ( APInt  A,
APInt  B 
)
static

Definition at line 1460 of file DependenceAnalysis.cpp.

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

Referenced by isRemainderZero(), and minAPInt().

◆ minAPInt()

static APInt minAPInt ( APInt  A,
APInt  B 
)
static

◆ STATISTIC() [1/32]

STATISTIC ( TotalArrayPairs  ,
"Array pairs tested"   
)

◆ STATISTIC() [2/32]

STATISTIC ( SeparableSubscriptPairs  ,
"Separable subscript pairs  
)

◆ STATISTIC() [3/32]

STATISTIC ( CoupledSubscriptPairs  ,
"Coupled subscript pairs  
)

◆ STATISTIC() [4/32]

STATISTIC ( NonlinearSubscriptPairs  ,
"Nonlinear subscript pairs  
)

◆ STATISTIC() [5/32]

STATISTIC ( ZIVapplications  ,
"ZIV applications"   
)

◆ STATISTIC() [6/32]

STATISTIC ( ZIVindependence  ,
"ZIV independence"   
)

◆ STATISTIC() [7/32]

STATISTIC ( StrongSIVapplications  ,
"Strong SIV applications"   
)

◆ STATISTIC() [8/32]

STATISTIC ( StrongSIVsuccesses  ,
"Strong SIV successes"   
)

◆ STATISTIC() [9/32]

STATISTIC ( StrongSIVindependence  ,
"Strong SIV independence"   
)

◆ STATISTIC() [10/32]

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

◆ STATISTIC() [11/32]

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

◆ STATISTIC() [12/32]

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

◆ STATISTIC() [13/32]

STATISTIC ( ExactSIVapplications  ,
"Exact SIV applications"   
)

◆ STATISTIC() [14/32]

STATISTIC ( ExactSIVsuccesses  ,
"Exact SIV successes"   
)

◆ STATISTIC() [15/32]

STATISTIC ( ExactSIVindependence  ,
"Exact SIV independence"   
)

◆ STATISTIC() [16/32]

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

◆ STATISTIC() [17/32]

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

◆ STATISTIC() [18/32]

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

◆ STATISTIC() [19/32]

STATISTIC ( ExactRDIVapplications  ,
"Exact RDIV applications"   
)

◆ STATISTIC() [20/32]

STATISTIC ( ExactRDIVindependence  ,
"Exact RDIV independence"   
)

◆ STATISTIC() [21/32]

STATISTIC ( SymbolicRDIVapplications  ,
"Symbolic RDIV applications"   
)

◆ STATISTIC() [22/32]

STATISTIC ( SymbolicRDIVindependence  ,
"Symbolic RDIV independence"   
)

◆ STATISTIC() [23/32]

STATISTIC ( DeltaApplications  ,
"Delta applications"   
)

◆ STATISTIC() [24/32]

STATISTIC ( DeltaSuccesses  ,
"Delta successes"   
)

◆ STATISTIC() [25/32]

STATISTIC ( DeltaIndependence  ,
"Delta independence"   
)

◆ STATISTIC() [26/32]

STATISTIC ( DeltaPropagations  ,
"Delta propagations"   
)

◆ STATISTIC() [27/32]

STATISTIC ( GCDapplications  ,
"GCD applications"   
)

◆ STATISTIC() [28/32]

STATISTIC ( GCDsuccesses  ,
"GCD successes"   
)

◆ STATISTIC() [29/32]

STATISTIC ( GCDindependence  ,
"GCD independence"   
)

◆ STATISTIC() [30/32]

STATISTIC ( BanerjeeApplications  ,
"Banerjee applications"   
)

◆ STATISTIC() [31/32]

STATISTIC ( BanerjeeIndependence  ,
"Banerjee independence"   
)

◆ STATISTIC() [32/32]

STATISTIC ( BanerjeeSuccesses  ,
"Banerjee successes"   
)

◆ underlyingObjectsAlias()

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

Variable Documentation

◆ Analysis

Dependence Analysis

Definition at line 132 of file DependenceAnalysis.cpp.

◆ da

da

Definition at line 132 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

◆ true

Dependence true

Definition at line 132 of file DependenceAnalysis.cpp.