class Dependence

Declaration

class Dependence { /* full declaration omitted */ };

Description

Dependence - This class represents a dependence between two memory memory references in a function. It contains minimal information and is used in the very common situation where the compiler is unable to determine anything beyond the existence of a dependence; that is, it represents a confused dependence (see also FullDependence). In most cases (for output, flow, and anti dependences), the dependence implies an ordering, where the source must precede the destination; in contrast, input dependences are unordered. When a dependence graph is built, each Dependence will be a member of the set of predecessor edges for its destination instruction and a set if successor edges for its source instruction. These sets are represented as singly-linked lists, with the "next" fields stored in the dependence itelf.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:71

Member Variables

private llvm::Instruction* Src
private llvm::Instruction* Dst
private const llvm::Dependence* NextPredecessor = nullptr
private const llvm::Dependence* NextSuccessor = nullptr

Method Overview

Methods

Dependence(llvm::Instruction* Source,
           llvm::Instruction* Destination)

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:77

Parameters

llvm::Instruction* Source
llvm::Instruction* Destination

Dependence(llvm::Dependence&&)

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:73

Parameters

llvm::Dependence&&

void dump(llvm::raw_ostream& OS) const

Description

dump - For debugging purposes, dumps a dependence to OS.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:196

Parameters

llvm::raw_ostream& OS

virtual unsigned int getDirection(
    unsigned int Level) const

Description

getDirection - Returns the direction associated with a particular level.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:155

Parameters

unsigned int Level

virtual const llvm::SCEV* getDistance(
    unsigned int Level) const

Description

getDistance - Returns the distance (or NULL) associated with a particular level.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:159

Parameters

unsigned int Level

llvm::Instruction* getDst() const

Description

getDst - Returns the destination instruction for this dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:110

virtual unsigned int getLevels() const

Description

getLevels - Returns the number of common loops surrounding the source and destination of the dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:151

const llvm::Dependence* getNextPredecessor() const

Description

getNextPredecessor - Returns the value of the NextPredecessor field.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:180

const llvm::Dependence* getNextSuccessor() const

Description

getNextSuccessor - Returns the value of the NextSuccessor field.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:184

llvm::Instruction* getSrc() const

Description

getSrc - Returns the source instruction for this dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:106

bool isAnti() const

Description

isAnti - Returns true if this is an anti dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:126

virtual bool isConfused() const

Description

isConfused - Returns true if this dependence is confused (the compiler understands nothing and makes worst-case assumptions).

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:143

virtual bool isConsistent() const

Description

isConsistent - Returns true if this dependence is consistent (occurs every time the source and destination are executed).

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:147

bool isFlow() const

Description

isFlow - Returns true if this is a flow (aka true) dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:122

bool isInput() const

Description

isInput - Returns true if this is an input dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:114

virtual bool isLoopIndependent() const

Description

isLoopIndependent - Returns true if this is a loop-independent dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:138

bool isOrdered() const

Description

isOrdered - Returns true if dependence is Output, Flow, or Anti

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:130

bool isOutput() const

Description

isOutput - Returns true if this is an output dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:118

virtual bool isPeelFirst(unsigned int Level) const

Description

isPeelFirst - Returns true if peeling the first iteration from this loop will break this dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:163

Parameters

unsigned int Level

virtual bool isPeelLast(unsigned int Level) const

Description

isPeelLast - Returns true if peeling the last iteration from this loop will break this dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:167

Parameters

unsigned int Level

virtual bool isScalar(unsigned int Level) const

Description

isScalar - Returns true if a particular level is scalar; that is, if no subscript in the source or destination mention the induction variable associated with the loop at this level.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:176

Parameters

unsigned int Level

virtual bool isSplitable(unsigned int Level) const

Description

isSplitable - Returns true if splitting this loop will break the dependence.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:171

Parameters

unsigned int Level

bool isUnordered() const

Description

isUnordered - Returns true if dependence is Input

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:134

void setNextPredecessor(
    const llvm::Dependence* pred)

Description

setNextPredecessor - Sets the value of the NextPredecessor field.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:188

Parameters

const llvm::Dependence* pred

void setNextSuccessor(
    const llvm::Dependence* succ)

Description

setNextSuccessor - Sets the value of the NextSuccessor field.

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:192

Parameters

const llvm::Dependence* succ

virtual ~Dependence()

Declared at: llvm/include/llvm/Analysis/DependenceAnalysis.h:79