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.

Synopsis

Declared in <llvm/Analysis/DependenceAnalysis.h>

class Dependence;

Description

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.

Types

Name

Description

DVEntry

Dependence::DVEntry ‐ Each level in the distance/direction vector has a direction (or perhaps a union of several directions), and perhaps a distance. The dependency information could be across a single loop level or across two separate levels that have the same trip count and nesting depth, which helps to provide information for loop fusion candidation. For example, loops b and c have the same iteration count and depth: for (a = ...) { for (b = 0; b < 10; b++) { } for (c = 0; c < 10; c++) { } }

Member Functions

Name

Description

Dependence [constructor]

~Dependence [destructor] [virtual]

Destructor

dump

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

dumpImp

dumpImp ‐ For debugging purposes. Dumps a dependence to OS with or without considering the SameSD levels.

getDirection [virtual]

getDirection ‐ Returns the direction associated with a particular common or SameSD level.

getDistance [virtual]

getDistance ‐ Returns the distance (or NULL) associated with a particular common or SameSD level.

getDst

getDst ‐ Returns the destination instruction for this dependence.

getLevels [virtual]

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

getNextPredecessor

getNextPredecessor ‐ Returns the value of the NextPredecessor field.

getNextSuccessor

getNextSuccessor ‐ Returns the value of the NextSuccessor field.

getRuntimeAssumptions

getRuntimeAssumptions ‐ Returns the runtime assumptions under which this Dependence relation is valid.

getSameSDLevels [virtual]

getSameSDLevels ‐ Returns the number of separate SameSD loops surrounding the source and destination of the dependence.

getSrc

getSrc ‐ Returns the source instruction for this dependence.

inSameSDLoops [virtual]

inSameSDLoops ‐ Returns true if this level is an SameSD level, i.e., performed across two separate loop nests that have the Same Iteration and Depth.

isAnti

isAnti ‐ Returns true if this is an anti dependence.

isConfused [virtual]

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

isDirectionNegative [virtual]

Check if the direction vector is negative. A negative direction vector means Src and Dst are reversed in the actual program.

isFlow

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

isInput

isInput ‐ Returns true if this is an input dependence.

isLoopIndependent [virtual]

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

isOrdered

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

isOutput

isOutput ‐ Returns true if this is an output dependence.

isScalar [virtual]

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

isUnordered

isUnordered ‐ Returns true if dependence is Input

negate [virtual]

Negate the dependence by swapping the source and destination, and reversing the direction and distance information.

normalize [virtual]

If the direction vector is negative, normalize the direction vector to make it non‐negative. Normalization is done by reversing Src and Dst, plus reversing the dependence directions and distances in the vector.

setNextPredecessor

setNextPredecessor ‐ Sets the value of the NextPredecessor field.

setNextSuccessor

setNextSuccessor ‐ Sets the value of the NextSuccessor field.

Protected Member Functions

Name

Description

Dependence [constructor]

Move constructor

operator=

Move assignment operator

Protected Data Members

Name

Dst

Src

Friends

Name

Description

llvm::DependenceInfo

DependenceInfo ‐ This class is the main dependence‐analysis driver.

Derived Classes

Name

Description

FullDependence

FullDependence ‐ This class represents a dependence between two memory references in a function. It contains detailed information about the dependence (direction vectors, etc.) and is used when the compiler is able to accurately analyze the interaction of the references; that is, it is not a confused dependence (see Dependence). 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.

Created with MrDocs