LLVM 24.0.0git
llvm::ScheduleDAG Class Referenceabstract

#include "llvm/CodeGen/ScheduleDAG.h"

Inheritance diagram for llvm::ScheduleDAG:
[legend]

Public Member Functions

 ScheduleDAG (const ScheduleDAG &)=delete
ScheduleDAG & operator= (const ScheduleDAG &)=delete
 ScheduleDAG (MachineFunction &mf)
virtual ~ScheduleDAG ()
void clearDAG ()
 Clears the DAG state (between regions).
const MCInstrDesc * getInstrDesc (const SUnit *SU) const
 Returns the MCInstrDesc of this SUnit.
virtual void viewGraph (const Twine &Name, const Twine &Title)
 Pops up a GraphViz/gv window with the ScheduleDAG rendered using 'dot'.
virtual void viewGraph ()
 Out-of-line implementation with no arguments is handy for gdb.
virtual void dumpNode (const SUnit &SU) const =0
virtual void dump () const =0
void dumpNodeName (const SUnit &SU) const
virtual std::string getGraphNodeLabel (const SUnit *SU) const =0
 Returns a label for an SUnit node in a visualization of the ScheduleDAG.
virtual std::string getDAGName () const =0
 Returns a label for the region of code covered by the DAG.
virtual void addCustomGraphFeatures (GraphWriter< ScheduleDAG * > &) const
 Adds custom features for a visualization of the ScheduleDAG.
unsigned VerifyScheduledDAG (bool isBottomUp)
 Verifies that all SUnits were scheduled and that their state is consistent.

Public Attributes

const TargetMachine & TM
 Target processor.
const TargetInstrInfo * TII
 Target instruction information.
const TargetRegisterInfo * TRI
 Target processor register info.
MachineFunction & MF
 Machine function.
MachineRegisterInfo & MRI
 Virtual/real register map.
std::vector< SUnit > SUnits
 The scheduling units.
SUnit EntrySU
 Special node for the region entry.
SUnit ExitSU
 Special node for the region exit.
bool StressSched

Protected Member Functions

void dumpNodeAll (const SUnit &SU) const

Detailed Description

Definition at line 587 of file ScheduleDAG.h.

Constructor & Destructor Documentation

◆ ScheduleDAG() [1/2]

◆ ScheduleDAG() [2/2]

ScheduleDAG::ScheduleDAG ( MachineFunction & mf)
explicit

Definition at line 52 of file ScheduleDAG.cpp.

References MF, MRI, StressSched, StressSchedOpt, TII, TM, and TRI.

◆ ~ScheduleDAG()

ScheduleDAG::~ScheduleDAG ( )
virtualdefault

References clearDAG().

Member Function Documentation

◆ addCustomGraphFeatures()

virtual void llvm::ScheduleDAG::addCustomGraphFeatures ( GraphWriter< ScheduleDAG * > & ) const
inlinevirtual

Adds custom features for a visualization of the ScheduleDAG.

Definition at line 642 of file ScheduleDAG.h.

◆ clearDAG()

void ScheduleDAG::clearDAG ( )

Clears the DAG state (between regions).

Definition at line 63 of file ScheduleDAG.cpp.

References EntrySU, ExitSU, and SUnits.

Referenced by llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::ScheduleDAGSDNodes::Run(), and ~ScheduleDAG().

◆ dump()

virtual void llvm::ScheduleDAG::dump ( ) const
pure virtual

◆ dumpNode()

virtual void llvm::ScheduleDAG::dumpNode ( const SUnit & SU) const
pure virtual

◆ dumpNodeAll()

◆ dumpNodeName()

◆ getDAGName()

virtual std::string llvm::ScheduleDAG::getDAGName ( ) const
pure virtual

Returns a label for the region of code covered by the DAG.

Implemented in llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.

Referenced by viewGraph().

◆ getGraphNodeLabel()

virtual std::string llvm::ScheduleDAG::getGraphNodeLabel ( const SUnit * SU) const
pure virtual

Returns a label for an SUnit node in a visualization of the ScheduleDAG.

Implemented in llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.

◆ getInstrDesc()

const MCInstrDesc * llvm::ScheduleDAG::getInstrDesc ( const SUnit * SU) const
inline

Returns the MCInstrDesc of this SUnit.

Returns NULL for SDNodes without a machine opcode.

Definition at line 622 of file ScheduleDAG.h.

References llvm::MachineInstr::getDesc(), llvm::SUnit::getInstr(), llvm::SUnit::getNode(), and llvm::SUnit::isInstr().

◆ operator=()

ScheduleDAG & llvm::ScheduleDAG::operator= ( const ScheduleDAG & )
delete

References ScheduleDAG().

◆ VerifyScheduledDAG()

unsigned ScheduleDAG::VerifyScheduledDAG ( bool isBottomUp)

Verifies that all SUnits were scheduled and that their state is consistent.

Returns the number of scheduled SUnits.

Definition at line 397 of file ScheduleDAG.cpp.

References assert(), llvm::dbgs(), dumpNode(), llvm::SUnit::getDepth(), llvm::SUnit::getHeight(), llvm::SUnit::isScheduled, llvm::SUnit::NumPreds, llvm::SUnit::NumPredsLeft, llvm::SUnit::NumSuccs, llvm::SUnit::NumSuccsLeft, and SUnits.

Referenced by llvm::ScheduleDAGSDNodes::VerifyScheduledSequence().

◆ viewGraph() [1/2]

void ScheduleDAG::viewGraph ( )
virtual

Out-of-line implementation with no arguments is handy for gdb.

Reimplemented in llvm::ScheduleDAGMI.

Definition at line 84 of file ScheduleDAGPrinter.cpp.

References getDAGName(), and viewGraph().

Referenced by viewGraph().

◆ viewGraph() [2/2]

void ScheduleDAG::viewGraph ( const Twine & Name,
const Twine & Title )
virtual

Pops up a GraphViz/gv window with the ScheduleDAG rendered using 'dot'.

viewGraph - Pop up a ghostview window with the reachable parts of the DAG rendered using 'dot'.

Reimplemented in llvm::ScheduleDAGMI.

Definition at line 73 of file ScheduleDAGPrinter.cpp.

References llvm::errs(), and llvm::ViewGraph().

Member Data Documentation

◆ EntrySU

◆ ExitSU

◆ MF

MachineFunction& llvm::ScheduleDAG::MF

◆ MRI

◆ StressSched

bool llvm::ScheduleDAG::StressSched

Definition at line 601 of file ScheduleDAG.h.

Referenced by ScheduleDAG().

◆ SUnits

◆ TII

◆ TM

const TargetMachine& llvm::ScheduleDAG::TM

Target processor.

Definition at line 589 of file ScheduleDAG.h.

Referenced by ScheduleDAG().

◆ TRI


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