LLVM  8.0.1
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
llvm::ScheduleDAG Class Referenceabstract

#include "llvm/CodeGen/ScheduleDAG.h"

Inheritance diagram for llvm::ScheduleDAG:
Inheritance graph
[legend]
Collaboration diagram for llvm::ScheduleDAG:
Collaboration graph
[legend]

Public Member Functions

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

Public Attributes

const LLVMTargetMachineTM
 Target processor. More...
 
const TargetInstrInfoTII
 Target instruction information. More...
 
const TargetRegisterInfoTRI
 Target processor register info. More...
 
MachineFunctionMF
 Machine function. More...
 
MachineRegisterInfoMRI
 Virtual/real register map. More...
 
std::vector< SUnitSUnits
 The scheduling units. More...
 
SUnit EntrySU
 Special node for the region entry. More...
 
SUnit ExitSU
 Special node for the region exit. More...
 
bool StressSched
 

Protected Member Functions

void dumpNodeAll (const SUnit &SU) const
 

Detailed Description

Definition at line 559 of file ScheduleDAG.h.

Constructor & Destructor Documentation

◆ ScheduleDAG()

ScheduleDAG::ScheduleDAG ( MachineFunction mf)
explicit

Definition at line 49 of file ScheduleDAG.cpp.

References StressSched, StressSchedOpt, and ~ScheduleDAG().

◆ ~ScheduleDAG()

ScheduleDAG::~ScheduleDAG ( )
virtualdefault

Referenced by ScheduleDAG().

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 605 of file ScheduleDAG.h.

Referenced by llvm::DOTGraphTraits< ScheduleDAG * >::addCustomGraphFeatures().

◆ clearDAG()

void ScheduleDAG::clearDAG ( )

Clears the DAG state (between regions).

Definition at line 60 of file ScheduleDAG.cpp.

References EntrySU, ExitSU, and SUnits.

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

◆ dump()

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

◆ dumpNode()

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

◆ dumpNodeAll()

LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeAll ( const SUnit SU) const
protected

◆ dumpNodeName()

LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeName ( const SUnit SU) const

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

◆ getGraphNodeLabel()

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

◆ getInstrDesc()

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

◆ 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 386 of file ScheduleDAG.cpp.

References assert(), llvm::dbgs(), dumpNode(), llvm::SUnit::getDepth(), llvm::SUnit::getHeight(), llvm::SUnit::isScheduled, llvm::max(), 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 ( 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 85 of file ScheduleDAGPrinter.cpp.

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

◆ viewGraph() [2/2]

void ScheduleDAG::viewGraph ( )
virtual

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

Reimplemented in llvm::ScheduleDAGMI.

Definition at line 96 of file ScheduleDAGPrinter.cpp.

Member Data Documentation

◆ EntrySU

SUnit llvm::ScheduleDAG::EntrySU

◆ ExitSU

SUnit llvm::ScheduleDAG::ExitSU

◆ MF

MachineFunction& llvm::ScheduleDAG::MF

◆ MRI

MachineRegisterInfo& llvm::ScheduleDAG::MRI

◆ StressSched

bool llvm::ScheduleDAG::StressSched

Definition at line 573 of file ScheduleDAG.h.

Referenced by ScheduleDAG().

◆ SUnits

std::vector<SUnit> llvm::ScheduleDAG::SUnits

◆ TII

const TargetInstrInfo* llvm::ScheduleDAG::TII

◆ TM

const LLVMTargetMachine& llvm::ScheduleDAG::TM

Target processor.

Definition at line 561 of file ScheduleDAG.h.

◆ TRI

const TargetRegisterInfo* llvm::ScheduleDAG::TRI

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