LLVM API Documentation

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions
llvm::ScheduleDAGSDNodes Class Reference

#include <ScheduleDAGSDNodes.h>

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

List of all members.

Classes

class  RegDefIter

Public Member Functions

 ScheduleDAGSDNodes (MachineFunction &mf)
virtual ~ScheduleDAGSDNodes ()
void Run (SelectionDAG *dag, MachineBasicBlock *bb)
SUnitnewSUnit (SDNode *N)
SUnitClone (SUnit *N)
void BuildSchedGraph (AliasAnalysis *AA)
void InitVRegCycleFlag (SUnit *SU)
void InitNumRegDefsLeft (SUnit *SU)
virtual void computeLatency (SUnit *SU)
virtual void computeOperandLatency (SDNode *Def, SDNode *Use, unsigned OpIdx, SDep &dep) const
virtual void Schedule ()=0
void VerifyScheduledSequence (bool isBottomUp)
virtual MachineBasicBlockEmitSchedule (MachineBasicBlock::iterator &InsertPos)
void dumpNode (const SUnit *SU) const override
void dumpSchedule () const
std::string getGraphNodeLabel (const SUnit *SU) const override
std::string getDAGName () const override
 Return the basic block label.
virtual void getCustomGraphFeatures (GraphWriter< ScheduleDAG * > &GW) const

Static Public Member Functions

static bool isPassiveNode (SDNode *Node)

Public Attributes

MachineBasicBlockBB
SelectionDAGDAG
const InstrItineraryDataInstrItins
std::vector< SUnit * > Sequence
 The schedule. Null SUnit*'s represent noop instructions.

Protected Member Functions

virtual bool forceUnitLatencies () const

Detailed Description

ScheduleDAGSDNodes - A ScheduleDAG for scheduling SDNode-based DAGs.

Edges between SUnits are initially based on edges in the SelectionDAG, and additional edges can be added by the schedulers as heuristics. SDNodes such as Constants, Registers, and a few others that are not interesting to schedulers are not allocated SUnits.

SDNodes with MVT::Glue operands are grouped along with the flagged nodes into a single SUnit so that they are scheduled together.

SDNode-based scheduling graphs do not use SDep::Anti or SDep::Output edges. Physical register dependence information is not carried in the DAG and must be handled explicitly by schedulers.

Definition at line 36 of file ScheduleDAGSDNodes.h.


Constructor & Destructor Documentation

Definition at line 49 of file ScheduleDAGSDNodes.cpp.

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

Definition at line 47 of file ScheduleDAGSDNodes.h.


Member Function Documentation

BuildSchedGraph - Build the SUnit graph from the selection dag that we are input. This SUnit graph is similar to the SelectionDAG, but excludes nodes that aren't interesting to scheduling, and represents flagged together nodes with a single SUnit.

BuildSchedGraph - Build the SUnit graph from the selection dag that we are input. This SUnit graph is similar to the SelectionDAG, but excludes nodes that aren't interesting to scheduling, and represents glued together nodes with a single SUnit.

Definition at line 522 of file ScheduleDAGSDNodes.cpp.

void ScheduleDAGSDNodes::computeLatency ( SUnit SU) [virtual]
void ScheduleDAGSDNodes::computeOperandLatency ( SDNode Def,
SDNode Use,
unsigned  OpIdx,
SDep dep 
) const [virtual]
void ScheduleDAGSDNodes::dumpNode ( const SUnit SU) const [override, virtual]

Definition at line 674 of file ScheduleDAGSDNodes.cpp.

References llvm::dbgs(), and llvm::SUnit::dump().

EmitSchedule - Insert MachineInstrs into the MachineBasicBlock according to the order specified in Sequence.

EmitSchedule - Emit the machine code in scheduled order. Return the new InsertPos and MachineBasicBlock that contains this insertion point. ScheduleDAGSDNodes holds a BB pointer for convenience, but this does not necessarily refer to returned BB. The emitter may split blocks.

Definition at line 798 of file ScheduleDAGSDNodes.cpp.

References llvm::SmallVectorTemplateCommon< T >::back(), BB, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::MachineFunction::begin(), llvm::SelectionDAG::ByvalParmDbgBegin(), llvm::SelectionDAG::ByvalParmDbgEnd(), DAG, llvm::SelectionDAG::DbgBegin(), llvm::SelectionDAG::DbgEnd(), llvm::InstrEmitter::EmitDbgValue(), llvm::InstrEmitter::EmitNode(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::InstrEmitter::getBlock(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::SDNode::getGluedNode(), llvm::InstrEmitter::getInsertPos(), llvm::SUnit::getNode(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::SelectionDAG::hasDebugValues(), llvm::MachineBasicBlock::insert(), llvm::TargetInstrInfo::insertNoop(), llvm::SUnit::isCloned, llvm::AArch64CC::MI, llvm::SUnit::OrigNode, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), ProcessSourceNode(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateCommon< T >::size(), and llvm::ScheduleDAG::TII.

virtual bool llvm::ScheduleDAGSDNodes::forceUnitLatencies ( ) const [inline, protected, virtual]

ForceUnitLatencies - Return true if all scheduling edges should be given a latency value of one. The default is to return false; schedulers may override this as needed.

Definition at line 166 of file ScheduleDAGSDNodes.h.

Referenced by computeLatency(), and computeOperandLatency().

std::string ScheduleDAGSDNodes::getDAGName ( ) const [override, virtual]

Return the basic block label.

Implements llvm::ScheduleDAG.

Definition at line 911 of file ScheduleDAGSDNodes.cpp.

References BB, and llvm::MachineBasicBlock::getFullName().

std::string ScheduleDAGSDNodes::getGraphNodeLabel ( const SUnit SU) const [override, virtual]

InitNumRegDefsLeft - Determine the # of regs defined by this node.

Definition at line 583 of file ScheduleDAGSDNodes.cpp.

References I, and llvm::SUnit::NumRegDefsLeft.

InitVRegCycleFlag - Set isVRegCycle if this node's single use is CopyToReg and its only active data operands are CopyFromReg within a single block loop.

static bool llvm::ScheduleDAGSDNodes::isPassiveNode ( SDNode Node) [inline, static]

isPassiveNode - Return true if the node is a non-scheduled leaf.

Definition at line 55 of file ScheduleDAGSDNodes.h.

References llvm::ISD::EntryToken, llvm::SDNode::getOpcode(), and Node.

Run - perform scheduling.

Definition at line 55 of file ScheduleDAGSDNodes.cpp.

References BB, llvm::ScheduleDAG::clearDAG(), DAG, and Schedule().

virtual void llvm::ScheduleDAGSDNodes::Schedule ( ) [pure virtual]

Schedule - Order nodes according to selected style, filling in the Sequence member.

Referenced by Run().

VerifyScheduledSequence - Verify that all SUnits are scheduled and consistent with the Sequence of scheduled instructions.

VerifyScheduledSequence - Verify that all SUnits were scheduled and that their state is consistent with the nodes listed in Sequence.

Definition at line 688 of file ScheduleDAGSDNodes.cpp.

References llvm::ScheduleDAG::VerifyScheduledDAG().


Member Data Documentation

Definition at line 40 of file ScheduleDAGSDNodes.h.

Referenced by computeLatency(), and computeOperandLatency().

The schedule. Null SUnit*'s represent noop instructions.

Definition at line 43 of file ScheduleDAGSDNodes.h.


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