LLVM
8.0.1
|
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) | |
virtual | ~Dependence () |
Instruction * | getSrc () const |
getSrc - Returns the source instruction for this dependence. More... | |
Instruction * | getDst () const |
getDst - Returns the destination instruction for this dependence. More... | |
bool | isInput () const |
isInput - Returns true if this is an input dependence. More... | |
bool | isOutput () const |
isOutput - Returns true if this is an output dependence. More... | |
bool | isFlow () const |
isFlow - Returns true if this is a flow (aka true) dependence. More... | |
bool | isAnti () const |
isAnti - Returns true if this is an anti dependence. More... | |
bool | isOrdered () const |
isOrdered - Returns true if dependence is Output, Flow, or Anti More... | |
bool | isUnordered () const |
isUnordered - Returns true if dependence is Input More... | |
virtual bool | isLoopIndependent () const |
isLoopIndependent - Returns true if this is a loop-independent dependence. More... | |
virtual bool | isConfused () const |
isConfused - Returns true if this dependence is confused (the compiler understands nothing and makes worst-case assumptions). More... | |
virtual bool | isConsistent () const |
isConsistent - Returns true if this dependence is consistent (occurs every time the source and destination are executed). More... | |
virtual unsigned | getLevels () const |
getLevels - Returns the number of common loops surrounding the source and destination of the dependence. More... | |
virtual unsigned | getDirection (unsigned Level) const |
getDirection - Returns the direction associated with a particular level. More... | |
virtual const SCEV * | getDistance (unsigned Level) const |
getDistance - Returns the distance (or NULL) associated with a particular level. More... | |
virtual bool | isPeelFirst (unsigned Level) const |
isPeelFirst - Returns true if peeling the first iteration from this loop will break this dependence. More... | |
virtual bool | isPeelLast (unsigned Level) const |
isPeelLast - Returns true if peeling the last iteration from this loop will break this dependence. More... | |
virtual bool | isSplitable (unsigned Level) const |
isSplitable - Returns true if splitting this loop will break the dependence. More... | |
virtual bool | isScalar (unsigned Level) const |
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. More... | |
const Dependence * | getNextPredecessor () const |
getNextPredecessor - Returns the value of the NextPredecessor field. More... | |
const Dependence * | getNextSuccessor () const |
getNextSuccessor - Returns the value of the NextSuccessor field. More... | |
void | setNextPredecessor (const Dependence *pred) |
setNextPredecessor - Sets the value of the NextPredecessor field. More... | |
void | setNextSuccessor (const Dependence *succ) |
setNextSuccessor - Sets the value of the NextSuccessor field. More... | |
void | dump (raw_ostream &OS) const |
dump - For debugging purposes, dumps a dependence to OS. More... | |
Protected Member Functions | |
Dependence (Dependence &&)=default | |
Dependence & | operator= (Dependence &&)=default |
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 |
|
inline |
Definition at line 77 of file DependenceAnalysis.h.
|
inlinevirtual |
Definition at line 83 of file DependenceAnalysis.h.
void Dependence::dump | ( | raw_ostream & | OS | ) | const |
dump - For debugging purposes, dumps a dependence to OS.
Definition at line 578 of file DependenceAnalysis.cpp.
References llvm::Dependence::DVEntry::ALL, llvm::Dependence::DVEntry::EQ, llvm::FullDependence::getDirection(), llvm::FullDependence::getDistance(), llvm::FullDependence::getLevels(), llvm::Dependence::DVEntry::GT, isAnti(), llvm::FullDependence::isConfused(), llvm::FullDependence::isConsistent(), isFlow(), isInput(), llvm::FullDependence::isLoopIndependent(), isOutput(), llvm::FullDependence::isPeelFirst(), llvm::FullDependence::isPeelLast(), llvm::FullDependence::isScalar(), llvm::FullDependence::isSplitable(), and llvm::Dependence::DVEntry::LT.
Referenced by getConstantPart(), llvm::DependenceInfo::getFunction(), and setNextSuccessor().
getDirection - Returns the direction associated with a particular level.
Reimplemented in llvm::FullDependence.
Definition at line 158 of file DependenceAnalysis.h.
References llvm::Dependence::DVEntry::ALL.
Referenced by llvm::FullDependence::getLevels().
getDistance - Returns the distance (or NULL) associated with a particular level.
Reimplemented in llvm::FullDependence.
Definition at line 162 of file DependenceAnalysis.h.
Referenced by llvm::FullDependence::getLevels().
|
inline |
getDst - Returns the destination instruction for this dependence.
Definition at line 113 of file DependenceAnalysis.h.
References isAnti(), isFlow(), isInput(), and isOutput().
Referenced by llvm::DependenceInfo::getSplitIteration().
|
inlinevirtual |
getLevels - Returns the number of common loops surrounding the source and destination of the dependence.
Reimplemented in llvm::FullDependence.
Definition at line 154 of file DependenceAnalysis.h.
|
inline |
getNextPredecessor - Returns the value of the NextPredecessor field.
Definition at line 183 of file DependenceAnalysis.h.
|
inline |
getNextSuccessor - Returns the value of the NextSuccessor field.
Definition at line 187 of file DependenceAnalysis.h.
|
inline |
getSrc - Returns the source instruction for this dependence.
Definition at line 109 of file DependenceAnalysis.h.
Referenced by llvm::DependenceInfo::getSplitIteration().
bool Dependence::isAnti | ( | ) | const |
isAnti - Returns true if this is an anti dependence.
Definition at line 226 of file DependenceAnalysis.cpp.
Referenced by dump(), getDst(), 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 146 of file DependenceAnalysis.h.
|
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 150 of file DependenceAnalysis.h.
bool Dependence::isFlow | ( | ) | const |
isFlow - Returns true if this is a flow (aka true) dependence.
Definition at line 220 of file DependenceAnalysis.cpp.
Referenced by dump(), getDst(), and isOrdered().
bool Dependence::isInput | ( | ) | const |
isInput - Returns true if this is an input dependence.
Definition at line 208 of file DependenceAnalysis.cpp.
Referenced by dump(), getDst(), and isUnordered().
|
inlinevirtual |
isLoopIndependent - Returns true if this is a loop-independent dependence.
Reimplemented in llvm::FullDependence.
Definition at line 141 of file DependenceAnalysis.h.
|
inline |
isOrdered - Returns true if dependence is Output, Flow, or Anti
Definition at line 133 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 214 of file DependenceAnalysis.cpp.
Referenced by dump(), getDst(), and isOrdered().
isPeelFirst - Returns true if peeling the first iteration from this loop will break this dependence.
Reimplemented in llvm::FullDependence.
Definition at line 166 of file DependenceAnalysis.h.
Referenced by llvm::FullDependence::getLevels().
isPeelLast - Returns true if peeling the last iteration from this loop will break this dependence.
Reimplemented in llvm::FullDependence.
Definition at line 170 of file DependenceAnalysis.h.
Referenced by llvm::FullDependence::getLevels().
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.
Reimplemented in llvm::FullDependence.
Definition at line 235 of file DependenceAnalysis.cpp.
Referenced by llvm::FullDependence::getLevels(), and isSplitable().
isSplitable - Returns true if splitting this loop will break the dependence.
Reimplemented in llvm::FullDependence.
Definition at line 174 of file DependenceAnalysis.h.
References isScalar().
Referenced by llvm::FullDependence::getLevels(), and llvm::DependenceInfo::getSplitIteration().
|
inline |
isUnordered - Returns true if dependence is Input
Definition at line 137 of file DependenceAnalysis.h.
References isInput().
|
protecteddefault |
|
inline |
setNextPredecessor - Sets the value of the NextPredecessor field.
Definition at line 191 of file DependenceAnalysis.h.
References pred.
|
inline |
setNextSuccessor - Sets the value of the NextSuccessor field.
Definition at line 195 of file DependenceAnalysis.h.
References dump().
|
friend |
Definition at line 204 of file DependenceAnalysis.h.