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 |
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 |
|
|
|
Destructor |
dump ‐ For debugging purposes, dumps a dependence to OS. |
|
dumpImp ‐ For debugging purposes. Dumps a dependence to OS with or without considering the SameSD levels. |
|
|
getDirection ‐ Returns the direction associated with a particular common or SameSD level. |
|
getDistance ‐ Returns the distance (or NULL) associated with a particular common or SameSD level. |
getDst ‐ Returns the destination instruction for this dependence. |
|
|
getLevels ‐ Returns the number of common loops surrounding the source and destination of the dependence. |
getNextPredecessor ‐ Returns the value of the NextPredecessor field. |
|
getNextSuccessor ‐ Returns the value of the NextSuccessor field. |
|
getRuntimeAssumptions ‐ Returns the runtime assumptions under which this Dependence relation is valid. |
|
|
getSameSDLevels ‐ Returns the number of separate SameSD loops surrounding the source and destination of the dependence. |
getSrc ‐ Returns the source instruction for this dependence. |
|
|
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 ‐ Returns true if this is an anti dependence. |
|
|
isConfused ‐ Returns true if this dependence is confused (the compiler understands nothing and makes worst‐case assumptions). |
|
Check if the direction vector is negative. A negative direction vector means Src and Dst are reversed in the actual program. |
isFlow ‐ Returns true if this is a flow (aka true) dependence. |
|
isInput ‐ Returns true if this is an input dependence. |
|
|
isLoopIndependent ‐ Returns true if this is a loop‐independent dependence. |
isOrdered ‐ Returns true if dependence is Output, Flow, or Anti |
|
isOutput ‐ Returns true if this is an output dependence. |
|
|
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 ‐ Returns true if dependence is Input |
|
|
Negate the dependence by swapping the source and destination, and reversing the direction and distance information. |
|
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 ‐ Sets the value of the NextPredecessor field. |
|
setNextSuccessor ‐ Sets the value of the NextSuccessor field. |
Protected Member Functions
Name |
Description |
|
Move constructor |
Move assignment operator |
Friends
Name |
Description |
DependenceInfo ‐ This class is the main dependence‐analysis driver. |
Derived Classes
Name |
Description |
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