LLVM 20.0.0git
Public Member Functions | List of all members
llvm::SwingSchedulerDDGEdge Class Reference

Represents a dependence between two instruction. More...

#include "llvm/CodeGen/MachinePipeliner.h"

Public Member Functions

 SwingSchedulerDDGEdge (SUnit *PredOrSucc, const SDep &Dep, bool IsSucc)
 Creates an edge corresponding to an edge represented by PredOrSucc and Dep in the original DAG.
 
SUnitgetSrc () const
 Returns the SUnit from which the edge comes (source node).
 
SUnitgetDst () const
 Returns the SUnit to which the edge points (destination node).
 
unsigned getLatency () const
 Returns the latency value for the edge.
 
void setLatency (unsigned Latency)
 Sets the latency for the edge.
 
unsigned getDistance () const
 Returns the distance value for the edge.
 
void setDistance (unsigned D)
 Sets the distance value for the edge.
 
Register getReg () const
 Returns the register associated with the edge.
 
bool isAntiDep () const
 Returns true if the edge represents anti dependence.
 
bool isOutputDep () const
 Returns true if the edge represents output dependence.
 
bool isOrderDep () const
 Returns true if the edge represents a dependence that is not data, anti or output dependence.
 
bool isBarrier () const
 Returns true if the edge represents unknown scheduling barrier.
 
bool isArtificial () const
 Returns true if the edge represents an artificial dependence.
 
bool isAssignedRegDep () const
 Tests if this is a Data dependence that is associated with a register.
 
bool ignoreDependence (bool IgnoreAnti) const
 Returns true for DDG nodes that we ignore when computing the cost functions.
 

Detailed Description

Represents a dependence between two instruction.

Definition at line 119 of file MachinePipeliner.h.

Constructor & Destructor Documentation

◆ SwingSchedulerDDGEdge()

llvm::SwingSchedulerDDGEdge::SwingSchedulerDDGEdge ( SUnit PredOrSucc,
const SDep Dep,
bool  IsSucc 
)
inline

Creates an edge corresponding to an edge represented by PredOrSucc and Dep in the original DAG.

This pair has no information about the direction of the edge, so we need to pass an additional argument IsSucc.

Definition at line 129 of file MachinePipeliner.h.

References llvm::SDep::Anti, llvm::SDep::Data, llvm::SDep::getKind(), llvm::SDep::getReg(), llvm::SDep::getSUnit(), Reg, llvm::SDep::setSUnit(), and std::swap().

Member Function Documentation

◆ getDistance()

unsigned llvm::SwingSchedulerDDGEdge::getDistance ( ) const
inline

Returns the distance value for the edge.

Definition at line 160 of file MachinePipeliner.h.

◆ getDst()

SUnit * llvm::SwingSchedulerDDGEdge::getDst ( ) const
inline

Returns the SUnit to which the edge points (destination node).

Definition at line 151 of file MachinePipeliner.h.

Referenced by llvm::SwingSchedulerDAG::isLoopCarriedDep(), and llvm::SMSchedule::latestCycleInChain().

◆ getLatency()

unsigned llvm::SwingSchedulerDDGEdge::getLatency ( ) const
inline

Returns the latency value for the edge.

Definition at line 154 of file MachinePipeliner.h.

References llvm::SDep::getLatency().

◆ getReg()

Register llvm::SwingSchedulerDDGEdge::getReg ( ) const
inline

Returns the register associated with the edge.

Definition at line 166 of file MachinePipeliner.h.

References llvm::SDep::getReg().

◆ getSrc()

SUnit * llvm::SwingSchedulerDDGEdge::getSrc ( ) const
inline

Returns the SUnit from which the edge comes (source node).

Definition at line 148 of file MachinePipeliner.h.

References llvm::SDep::getSUnit().

Referenced by llvm::SMSchedule::earliestCycleInChain(), and llvm::SwingSchedulerDAG::isLoopCarriedDep().

◆ ignoreDependence()

bool SwingSchedulerDDGEdge::ignoreDependence ( bool  IgnoreAnti) const

Returns true for DDG nodes that we ignore when computing the cost functions.

We ignore the back-edge recurrence in order to avoid unbounded recursion in the calculation of the ASAP, ALAP, etc functions.

Definition at line 3753 of file MachinePipeliner.cpp.

References llvm::SDep::Anti.

◆ isAntiDep()

bool llvm::SwingSchedulerDDGEdge::isAntiDep ( ) const
inline

Returns true if the edge represents anti dependence.

Definition at line 169 of file MachinePipeliner.h.

References llvm::SDep::Anti, and llvm::SDep::getKind().

◆ isArtificial()

bool llvm::SwingSchedulerDDGEdge::isArtificial ( ) const
inline

Returns true if the edge represents an artificial dependence.

Definition at line 182 of file MachinePipeliner.h.

References llvm::SDep::isArtificial().

Referenced by llvm::SwingSchedulerDAG::isLoopCarriedDep().

◆ isAssignedRegDep()

bool llvm::SwingSchedulerDDGEdge::isAssignedRegDep ( ) const
inline

Tests if this is a Data dependence that is associated with a register.

Definition at line 185 of file MachinePipeliner.h.

References llvm::SDep::isAssignedRegDep().

◆ isBarrier()

bool llvm::SwingSchedulerDDGEdge::isBarrier ( ) const
inline

Returns true if the edge represents unknown scheduling barrier.

Definition at line 179 of file MachinePipeliner.h.

References llvm::SDep::isBarrier().

◆ isOrderDep()

bool llvm::SwingSchedulerDDGEdge::isOrderDep ( ) const
inline

Returns true if the edge represents a dependence that is not data, anti or output dependence.

Definition at line 176 of file MachinePipeliner.h.

References llvm::SDep::getKind(), and llvm::SDep::Order.

Referenced by llvm::SwingSchedulerDAG::isLoopCarriedDep().

◆ isOutputDep()

bool llvm::SwingSchedulerDDGEdge::isOutputDep ( ) const
inline

Returns true if the edge represents output dependence.

Definition at line 172 of file MachinePipeliner.h.

References llvm::SDep::getKind(), and llvm::SDep::Output.

Referenced by llvm::SwingSchedulerDAG::isLoopCarriedDep().

◆ setDistance()

void llvm::SwingSchedulerDDGEdge::setDistance ( unsigned  D)
inline

Sets the distance value for the edge.

Definition at line 163 of file MachinePipeliner.h.

References D.

◆ setLatency()

void llvm::SwingSchedulerDDGEdge::setLatency ( unsigned  Latency)
inline

Sets the latency for the edge.

Definition at line 157 of file MachinePipeliner.h.

References llvm::Latency, and llvm::SDep::setLatency().


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