LLVM API Documentation

Classes | Public Member Functions | Friends
llvm::Dependence Class Reference

#include <DependenceAnalysis.h>

Inheritance diagram for llvm::Dependence:
Inheritance graph
[legend]

List of all members.

Classes

struct  DVEntry

Public Member Functions

 Dependence (Instruction *Source, Instruction *Destination)
virtual ~Dependence ()
InstructiongetSrc () const
InstructiongetDst () const
bool isInput () const
bool isOutput () const
bool isFlow () const
bool isAnti () const
bool isOrdered () const
bool isUnordered () const
virtual bool isLoopIndependent () const
virtual bool isConfused () const
virtual bool isConsistent () const
virtual unsigned getLevels () const
virtual unsigned getDirection (unsigned Level) const
virtual const SCEVgetDistance (unsigned Level) const
virtual bool isPeelFirst (unsigned Level) const
virtual bool isPeelLast (unsigned Level) const
virtual bool isSplitable (unsigned Level) const
virtual bool isScalar (unsigned Level) const
const DependencegetNextPredecessor () const
const DependencegetNextSuccessor () const
void setNextPredecessor (const Dependence *pred)
void setNextSuccessor (const Dependence *succ)
void dump (raw_ostream &OS) const

Friends

class DependenceAnalysis

Detailed 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.

Definition at line 70 of file DependenceAnalysis.h.


Constructor & Destructor Documentation

llvm::Dependence::Dependence ( Instruction Source,
Instruction Destination 
) [inline]

Definition at line 72 of file DependenceAnalysis.h.

virtual llvm::Dependence::~Dependence ( ) [inline, virtual]

Definition at line 78 of file DependenceAnalysis.h.


Member Function Documentation

void Dependence::dump ( raw_ostream OS) const
virtual unsigned llvm::Dependence::getDirection ( unsigned  Level) const [inline, virtual]

getDirection - Returns the direction associated with a particular level.

Reimplemented in llvm::FullDependence.

Definition at line 153 of file DependenceAnalysis.h.

References llvm::Dependence::DVEntry::ALL.

Referenced by dump().

virtual const SCEV* llvm::Dependence::getDistance ( unsigned  Level) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 157 of file DependenceAnalysis.h.

Referenced by dump().

getDst - Returns the destination instruction for this dependence.

Definition at line 108 of file DependenceAnalysis.h.

Referenced by llvm::DependenceAnalysis::getSplitIteration().

virtual unsigned llvm::Dependence::getLevels ( ) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 149 of file DependenceAnalysis.h.

Referenced by dump().

getNextPredecessor - Returns the value of the NextPredecessor field.

Definition at line 178 of file DependenceAnalysis.h.

getNextSuccessor - Returns the value of the NextSuccessor field.

Definition at line 184 of file DependenceAnalysis.h.

getSrc - Returns the source instruction for this dependence.

Definition at line 104 of file DependenceAnalysis.h.

Referenced by llvm::DependenceAnalysis::getSplitIteration().

isAnti - Returns true if this is an anti dependence.

Definition at line 211 of file DependenceAnalysis.cpp.

References llvm::Instruction::mayReadFromMemory(), and llvm::Instruction::mayWriteToMemory().

Referenced by dump(), and isOrdered().

virtual bool llvm::Dependence::isConfused ( ) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 141 of file DependenceAnalysis.h.

Referenced by dump().

virtual bool llvm::Dependence::isConsistent ( ) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 145 of file DependenceAnalysis.h.

Referenced by dump().

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

Definition at line 205 of file DependenceAnalysis.cpp.

References llvm::Instruction::mayReadFromMemory(), and llvm::Instruction::mayWriteToMemory().

Referenced by dump(), and isOrdered().

isInput - Returns true if this is an input dependence.

Definition at line 193 of file DependenceAnalysis.cpp.

References llvm::Instruction::mayReadFromMemory().

Referenced by dump(), and isUnordered().

virtual bool llvm::Dependence::isLoopIndependent ( ) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 136 of file DependenceAnalysis.h.

Referenced by dump().

bool llvm::Dependence::isOrdered ( ) const [inline]

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

Definition at line 128 of file DependenceAnalysis.h.

References isAnti(), isFlow(), and isOutput().

isOutput - Returns true if this is an output dependence.

Definition at line 199 of file DependenceAnalysis.cpp.

References llvm::Instruction::mayWriteToMemory().

Referenced by dump(), and isOrdered().

virtual bool llvm::Dependence::isPeelFirst ( unsigned  Level) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 161 of file DependenceAnalysis.h.

Referenced by dump().

virtual bool llvm::Dependence::isPeelLast ( unsigned  Level) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 165 of file DependenceAnalysis.h.

Referenced by dump().

bool Dependence::isScalar ( unsigned  Level) const [virtual]

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 220 of file DependenceAnalysis.cpp.

Referenced by dump().

virtual bool llvm::Dependence::isSplitable ( unsigned  Level) const [inline, virtual]

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

Reimplemented in llvm::FullDependence.

Definition at line 169 of file DependenceAnalysis.h.

Referenced by dump(), and llvm::DependenceAnalysis::getSplitIteration().

bool llvm::Dependence::isUnordered ( ) const [inline]

isUnordered - Returns true if dependence is Input

Definition at line 132 of file DependenceAnalysis.h.

References isInput().

setNextPredecessor - Sets the value of the NextPredecessor field.

Definition at line 190 of file DependenceAnalysis.h.

setNextSuccessor - Sets the value of the NextSuccessor field.

Definition at line 196 of file DependenceAnalysis.h.


Friends And Related Function Documentation

friend class DependenceAnalysis [friend]

Reimplemented in llvm::FullDependence.

Definition at line 206 of file DependenceAnalysis.h.


The documentation for this class was generated from the following files: