|
LLVM 22.0.0git
|
Dependence - This class represents a dependence between two memory memory references in a function. More...
#include "llvm/Analysis/DependenceAnalysis.h"
Classes | |
| struct | DVEntry |
| Dependence::DVEntry - Each level in the distance/direction vector has a direction (or perhaps a union of several directions), and perhaps a distance. More... | |
Public Member Functions | |
| Dependence (Instruction *Source, Instruction *Destination, const SCEVUnionPredicate &A) | |
| virtual | ~Dependence ()=default |
| Instruction * | getSrc () const |
| getSrc - Returns the source instruction for this dependence. | |
| Instruction * | getDst () const |
| getDst - Returns the destination instruction for this dependence. | |
| bool | isInput () const |
| isInput - Returns true if this is an input dependence. | |
| bool | isOutput () const |
| isOutput - Returns true if this is an output dependence. | |
| bool | isFlow () const |
| isFlow - Returns true if this is a flow (aka true) dependence. | |
| bool | isAnti () const |
| isAnti - Returns true if this is an anti dependence. | |
| bool | isOrdered () const |
| isOrdered - Returns true if dependence is Output, Flow, or Anti | |
| bool | isUnordered () const |
| isUnordered - Returns true if dependence is Input | |
| virtual bool | isLoopIndependent () const |
| isLoopIndependent - Returns true if this is a loop-independent dependence. | |
| virtual bool | isConfused () const |
| isConfused - Returns true if this dependence is confused (the compiler understands nothing and makes worst-case assumptions). | |
| virtual bool | isConsistent () const |
| isConsistent - Returns true if this dependence is consistent (occurs every time the source and destination are executed). | |
| virtual unsigned | getLevels () const |
| getLevels - Returns the number of common loops surrounding the source and destination of the dependence. | |
| virtual unsigned | getSameSDLevels () const |
| getSameSDLevels - Returns the number of separate SameSD loops surrounding the source and destination of the dependence. | |
| DVEntry | getDVEntry (unsigned Level, bool IsSameSD) const |
| getDVEntry - Returns the DV entry associated with a regular or a SameSD level | |
| virtual unsigned | getDirection (unsigned Level, bool SameSD=false) const |
| getDirection - Returns the direction associated with a particular common or SameSD level. | |
| virtual const SCEV * | getDistance (unsigned Level, bool SameSD=false) const |
| getDistance - Returns the distance (or NULL) associated with a particular common or SameSD level. | |
| virtual bool | isDirectionNegative () const |
| Check if the direction vector is negative. | |
| virtual bool | normalize (ScalarEvolution *SE) |
| If the direction vector is negative, normalize the direction vector to make it non-negative. | |
| virtual bool | isPeelFirst (unsigned Level, bool SameSD=false) const |
| isPeelFirst - Returns true if peeling the first iteration from this regular or SameSD loop level will break this dependence. | |
| virtual bool | isPeelLast (unsigned Level, bool SameSD=false) const |
| isPeelLast - Returns true if peeling the last iteration from this regular or SameSD loop level will break this dependence. | |
| virtual bool | isSplitable (unsigned Level, bool SameSD=false) const |
| isSplitable - Returns true if splitting the loop will break the dependence. | |
| virtual bool | inSameSDLoops (unsigned Level) const |
| 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. | |
| virtual bool | isScalar (unsigned Level, bool SameSD=false) const |
| 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. | |
| const Dependence * | getNextPredecessor () const |
| getNextPredecessor - Returns the value of the NextPredecessor field. | |
| const Dependence * | getNextSuccessor () const |
| getNextSuccessor - Returns the value of the NextSuccessor field. | |
| void | setNextPredecessor (const Dependence *pred) |
| setNextPredecessor - Sets the value of the NextPredecessor field. | |
| void | setNextSuccessor (const Dependence *succ) |
| setNextSuccessor - Sets the value of the NextSuccessor field. | |
| SCEVUnionPredicate | getRuntimeAssumptions () const |
| getRuntimeAssumptions - Returns the runtime assumptions under which this Dependence relation is valid. | |
| void | dump (raw_ostream &OS) const |
| dump - For debugging purposes, dumps a dependence to OS. | |
| void | dumpImp (raw_ostream &OS, bool IsSameSD=false) const |
| dumpImp - For debugging purposes. | |
Protected Member Functions | |
| Dependence (Dependence &&)=default | |
| Dependence & | operator= (Dependence &&)=default |
Protected Attributes | |
| Instruction * | Src |
| Instruction * | Dst |
Friends | |
| class | DependenceInfo |
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.
Definition at line 71 of file DependenceAnalysis.h.
|
protecteddefault |
References Dependence().
Referenced by Dependence(), llvm::FullDependence::FullDependence(), getNextPredecessor(), getNextSuccessor(), operator=(), setNextPredecessor(), and setNextSuccessor().
|
inline |
Definition at line 77 of file DependenceAnalysis.h.
|
virtualdefault |
| void Dependence::dump | ( | raw_ostream & | OS | ) | const |
dump - For debugging purposes, dumps a dependence to OS.
Definition at line 986 of file DependenceAnalysis.cpp.
References dumpImp(), getRuntimeAssumptions(), getSameSDLevels(), isAnti(), isConfused(), isConsistent(), isFlow(), isInput(), and isOutput().
Referenced by llvm::FullDependence::normalize().
| void Dependence::dumpImp | ( | raw_ostream & | OS, |
| bool | IsSameSD = false ) const |
dumpImp - For debugging purposes.
Dumps a dependence to OS with or without considering the SameSD levels.
Definition at line 1018 of file DependenceAnalysis.cpp.
References llvm::Dependence::DVEntry::ALL, llvm::Dependence::DVEntry::EQ, getDirection(), getDistance(), getLevels(), getSameSDLevels(), llvm::Dependence::DVEntry::GT, II, inSameSDLoops(), isLoopIndependent(), isPeelFirst(), isPeelLast(), isScalar(), isSplitable(), and llvm::Dependence::DVEntry::LT.
Referenced by dump().
|
inlinevirtual |
getDirection - Returns the direction associated with a particular common or SameSD level.
Reimplemented in llvm::FullDependence.
Definition at line 167 of file DependenceAnalysis.h.
References llvm::Dependence::DVEntry::ALL.
Referenced by dumpImp().
|
inlinevirtual |
getDistance - Returns the distance (or NULL) associated with a particular common or SameSD level.
Reimplemented in llvm::FullDependence.
Definition at line 173 of file DependenceAnalysis.h.
Referenced by dumpImp().
|
inline |
getDst - Returns the destination instruction for this dependence.
Definition at line 121 of file DependenceAnalysis.h.
References Dst.
Referenced by llvm::DependenceInfo::getSplitIteration().
getDVEntry - Returns the DV entry associated with a regular or a SameSD level
|
inlinevirtual |
getLevels - Returns the number of common loops surrounding the source and destination of the dependence.
Reimplemented in llvm::FullDependence.
Definition at line 155 of file DependenceAnalysis.h.
Referenced by dumpImp().
|
inline |
getNextPredecessor - Returns the value of the NextPredecessor field.
Definition at line 216 of file DependenceAnalysis.h.
References Dependence().
|
inline |
getNextSuccessor - Returns the value of the NextSuccessor field.
Definition at line 219 of file DependenceAnalysis.h.
References Dependence().
|
inline |
getRuntimeAssumptions - Returns the runtime assumptions under which this Dependence relation is valid.
Definition at line 230 of file DependenceAnalysis.h.
Referenced by dump().
|
inlinevirtual |
getSameSDLevels - Returns the number of separate SameSD loops surrounding the source and destination of the dependence.
Reimplemented in llvm::FullDependence.
Definition at line 159 of file DependenceAnalysis.h.
|
inline |
getSrc - Returns the source instruction for this dependence.
Definition at line 118 of file DependenceAnalysis.h.
References Src.
Referenced by llvm::DependenceInfo::getSplitIteration().
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.
Reimplemented in llvm::FullDependence.
Definition at line 208 of file DependenceAnalysis.h.
Referenced by dumpImp().
| bool Dependence::isAnti | ( | ) | const |
isAnti - Returns true if this is an anti dependence.
Definition at line 504 of file DependenceAnalysis.cpp.
Referenced by dump(), and isOrdered().
|
inlinevirtual |
isConfused - Returns true if this dependence is confused (the compiler understands nothing and makes worst-case assumptions).
Reimplemented in llvm::FullDependence.
Definition at line 147 of file DependenceAnalysis.h.
Referenced by dump().
|
inlinevirtual |
isConsistent - Returns true if this dependence is consistent (occurs every time the source and destination are executed).
Reimplemented in llvm::FullDependence.
Definition at line 151 of file DependenceAnalysis.h.
Referenced by dump().
|
inlinevirtual |
Check if the direction vector is negative.
A negative direction vector means Src and Dst are reversed in the actual program.
Reimplemented in llvm::FullDependence.
Definition at line 179 of file DependenceAnalysis.h.
| bool Dependence::isFlow | ( | ) | const |
isFlow - Returns true if this is a flow (aka true) dependence.
Definition at line 499 of file DependenceAnalysis.cpp.
Referenced by dump(), and isOrdered().
| bool Dependence::isInput | ( | ) | const |
isInput - Returns true if this is an input dependence.
Definition at line 489 of file DependenceAnalysis.cpp.
Referenced by dump().
|
inlinevirtual |
isLoopIndependent - Returns true if this is a loop-independent dependence.
Reimplemented in llvm::FullDependence.
Definition at line 143 of file DependenceAnalysis.h.
Referenced by dumpImp().
|
inline |
isOrdered - Returns true if dependence is Output, Flow, or Anti
Definition at line 136 of file DependenceAnalysis.h.
References isAnti(), isFlow(), and isOutput().
| bool Dependence::isOutput | ( | ) | const |
isOutput - Returns true if this is an output dependence.
Definition at line 494 of file DependenceAnalysis.cpp.
Referenced by dump(), and isOrdered().
|
inlinevirtual |
isPeelFirst - Returns true if peeling the first iteration from this regular or SameSD loop level will break this dependence.
Reimplemented in llvm::FullDependence.
Definition at line 189 of file DependenceAnalysis.h.
Referenced by dumpImp().
|
inlinevirtual |
isPeelLast - Returns true if peeling the last iteration from this regular or SameSD loop level will break this dependence.
Reimplemented in llvm::FullDependence.
Definition at line 195 of file DependenceAnalysis.h.
Referenced by dumpImp().
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.
Reimplemented in llvm::FullDependence.
Definition at line 512 of file DependenceAnalysis.cpp.
Referenced by dumpImp().
|
inlinevirtual |
isSplitable - Returns true if splitting the loop will break the dependence.
Reimplemented in llvm::FullDependence.
Definition at line 201 of file DependenceAnalysis.h.
Referenced by dumpImp(), and llvm::DependenceInfo::getSplitIteration().
|
inline |
isUnordered - Returns true if dependence is Input
Definition at line 139 of file DependenceAnalysis.h.
References isInput().
|
inlinevirtual |
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.
Reimplemented in llvm::FullDependence.
Definition at line 185 of file DependenceAnalysis.h.
|
protecteddefault |
References Dependence().
|
inline |
setNextPredecessor - Sets the value of the NextPredecessor field.
Definition at line 223 of file DependenceAnalysis.h.
References Dependence().
|
inline |
setNextSuccessor - Sets the value of the NextSuccessor field.
Definition at line 226 of file DependenceAnalysis.h.
References Dependence().
|
friend |
Definition at line 245 of file DependenceAnalysis.h.
References DependenceInfo.
Referenced by DependenceInfo.
|
protected |
Definition at line 240 of file DependenceAnalysis.h.
Referenced by Dependence(), getDst(), isAnti(), isFlow(), isInput(), isOutput(), and llvm::FullDependence::normalize().
|
protected |
Definition at line 240 of file DependenceAnalysis.h.
Referenced by Dependence(), getSrc(), isAnti(), isFlow(), isInput(), isOutput(), and llvm::FullDependence::normalize().