LLVM API Documentation

llvm::SDep Class Reference

#include <ScheduleDAG.h>

Collaboration diagram for llvm::SDep:
[legend]

List of all members.

Public Types

enum  Kind { Data, Anti, Output, Order }
 Kind - These are the different kinds of scheduling dependencies. More...

Public Member Functions

 SDep ()
 SDep (SUnit *S, Kind kind, unsigned latency=1, unsigned Reg=0, bool isNormalMemory=false, bool isMustAlias=false, bool isArtificial=false)
 SDep - Construct an SDep with the specified values.
bool operator== (const SDep &Other) const
bool operator!= (const SDep &Other) const
unsigned getLatency () const
void setLatency (unsigned Lat)
 setLatency - Set the latency for this edge.
SUnit * getSUnit () const
void setSUnit (SUnit *SU)
Kind getKind () const
 getKind - Return an enum value representing the kind of the dependence.
bool isCtrl () const
 isCtrl - Shorthand for getKind() != SDep::Data.
bool isNormalMemory () const
bool isMustAlias () const
bool isArtificial () const
bool isAssignedRegDep () const
unsigned getReg () const
void setReg (unsigned Reg)


Detailed Description

SDep - Scheduling dependency. This represents one direction of an edge in the scheduling DAG.

Definition at line 44 of file ScheduleDAG.h.


Member Enumeration Documentation

Kind - These are the different kinds of scheduling dependencies.

Enumerator:
Data  Regular data dependence (aka true-dependence).
Anti  A register anti-dependedence (aka WAR).
Output  A register output-dependence (aka WAW).
Order  Any other ordering dependency.

Definition at line 47 of file ScheduleDAG.h.


Constructor & Destructor Documentation

llvm::SDep::SDep (  )  [inline]

SDep - Construct a null SDep. This is only for use by container classes which require default constructors. SUnits may not have null SDep edges.

Definition at line 92 of file ScheduleDAG.h.

llvm::SDep::SDep ( SUnit *  S,
Kind  kind,
unsigned  latency = 1,
unsigned  Reg = 0,
bool  isNormalMemory = false,
bool  isMustAlias = false,
bool  isArtificial = false 
) [inline]

SDep - Construct an SDep with the specified values.

Definition at line 95 of file ScheduleDAG.h.

References Anti, Data, isArtificial(), isMustAlias(), isNormalMemory(), Order, Output, and Reg.


Member Function Documentation

bool llvm::SDep::operator== ( const SDep &  Other  )  const [inline]

Definition at line 119 of file ScheduleDAG.h.

References Anti, Contents, Data, Dep, Latency, Order, Output, and Reg.

Referenced by operator!=().

bool llvm::SDep::operator!= ( const SDep &  Other  )  const [inline]

Definition at line 136 of file ScheduleDAG.h.

References operator==().

unsigned llvm::SDep::getLatency (  )  const [inline]

getLatency - Return the latency value for this edge, which roughly means the minimum number of cycles that must elapse between the predecessor and the successor, given that they have this edge between them.

Definition at line 144 of file ScheduleDAG.h.

Referenced by llvm::SUnit::addPred(), and llvm::SUnit::removePred().

void llvm::SDep::setLatency ( unsigned  Lat  )  [inline]

setLatency - Set the latency for this edge.

Definition at line 149 of file ScheduleDAG.h.

Referenced by llvm::ScheduleDAGInstrs::ComputeOperandLatency().

SUnit* llvm::SDep::getSUnit (  )  const [inline]

Definition at line 154 of file ScheduleDAG.h.

Referenced by llvm::SUnit::addPred(), and llvm::SUnit::removePred().

void llvm::SDep::setSUnit ( SUnit *  SU  )  [inline]

Definition at line 159 of file ScheduleDAG.h.

Referenced by llvm::SUnit::addPred(), and llvm::SUnit::removePred().

Kind llvm::SDep::getKind (  )  const [inline]

getKind - Return an enum value representing the kind of the dependence.

Definition at line 164 of file ScheduleDAG.h.

Referenced by llvm::SUnit::addPred(), llvm::ScheduleDAGInstrs::ComputeOperandLatency(), getReg(), isArtificial(), isAssignedRegDep(), isCtrl(), isMustAlias(), isNormalMemory(), llvm::SUnit::removePred(), and setReg().

bool llvm::SDep::isCtrl (  )  const [inline]

isCtrl - Shorthand for getKind() != SDep::Data.

Definition at line 169 of file ScheduleDAG.h.

References Data, and getKind().

Referenced by llvm::SUnitIterator::isCtrlDep().

bool llvm::SDep::isNormalMemory (  )  const [inline]

isNormalMemory - Test if this is an Order dependence between two memory accesses where both sides of the dependence access memory in non-volatile and fully modeled ways.

Definition at line 176 of file ScheduleDAG.h.

References getKind(), and Order.

Referenced by SDep().

bool llvm::SDep::isMustAlias (  )  const [inline]

isMustAlias - Test if this is an Order dependence that is marked as "must alias", meaning that the SUnits at either end of the edge have a memory dependence on a known memory location.

Definition at line 183 of file ScheduleDAG.h.

References getKind(), and Order.

Referenced by SDep().

bool llvm::SDep::isArtificial (  )  const [inline]

isArtificial - Test if this is an Order dependence that is marked as "artificial", meaning it isn't necessary for correctness.

Definition at line 189 of file ScheduleDAG.h.

References getKind(), and Order.

Referenced by SDep().

bool llvm::SDep::isAssignedRegDep (  )  const [inline]

isAssignedRegDep - Test if this is a Data dependence that is associated with a register.

Definition at line 195 of file ScheduleDAG.h.

References Data, and getKind().

unsigned llvm::SDep::getReg (  )  const [inline]

getReg - Return the register associated with this edge. This is only valid on Data, Anti, and Output edges. On Data edges, this value may be zero, meaning there is no associated register.

Definition at line 202 of file ScheduleDAG.h.

References Anti, Data, getKind(), and Output.

Referenced by llvm::ScheduleDAGInstrs::ComputeOperandLatency().

void llvm::SDep::setReg ( unsigned  Reg  )  [inline]

setReg - Assign the associated register for this edge. This is only valid on Data, Anti, and Output edges. On Anti and Output edges, this value must not be zero. On Data edges, the value may be zero, which would mean that no specific register is associated with this edge.

Definition at line 213 of file ScheduleDAG.h.

References Anti, Data, getKind(), and Output.


Member Data Documentation

Reg - For Data, Anti, and Output dependencies, the associated register. For Data dependencies that don't currently have a register assigned, this is set to zero.

Definition at line 64 of file ScheduleDAG.h.

Referenced by operator==(), and SDep().

isNormalMemory - True if both sides of the dependence access memory in non-volatile and fully modeled ways.

Definition at line 70 of file ScheduleDAG.h.

isMustAlias - True if both sides of the dependence are known to access the same memory.

Definition at line 74 of file ScheduleDAG.h.

isArtificial - True if this is an artificial dependency, meaning it is not necessary for program correctness, and may be safely deleted if necessary.

Definition at line 79 of file ScheduleDAG.h.

Referenced by llvm::SUnitIterator::isArtificialDep().

struct { ... } llvm::SDep::Order

Order - Additional information about Order dependencies.

Referenced by llvm::ScheduleDAGInstrs::BuildSchedGraph(), llvm::SUnit::dumpAll(), isArtificial(), isMustAlias(), isNormalMemory(), operator==(), and SDep().


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