LLVM
8.0.1
|
#include "llvm/CodeGen/ScheduleDAG.h"
Public Member Functions | |
ScheduleDAG (MachineFunction &mf) | |
virtual | ~ScheduleDAG () |
void | clearDAG () |
Clears the DAG state (between regions). More... | |
const MCInstrDesc * | getInstrDesc (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 LLVMTargetMachine & | TM |
Target processor. More... | |
const TargetInstrInfo * | TII |
Target instruction information. More... | |
const TargetRegisterInfo * | TRI |
Target processor register info. More... | |
MachineFunction & | MF |
Machine function. More... | |
MachineRegisterInfo & | MRI |
Virtual/real register map. More... | |
std::vector< SUnit > | SUnits |
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 |
Definition at line 559 of file ScheduleDAG.h.
|
explicit |
Definition at line 49 of file ScheduleDAG.cpp.
References StressSched, StressSchedOpt, and ~ScheduleDAG().
|
virtualdefault |
Referenced by ScheduleDAG().
|
inlinevirtual |
Adds custom features for a visualization of the ScheduleDAG.
Definition at line 605 of file ScheduleDAG.h.
Referenced by llvm::DOTGraphTraits< ScheduleDAG * >::addCustomGraphFeatures().
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().
|
pure virtual |
Implemented in llvm::ScheduleDAGMILive, llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.
Implemented in llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.
Referenced by llvm::LatencyPriorityQueue::dump(), dumpNodeAll(), llvm::ScoreboardHazardRecognizer::getHazardType(), and VerifyScheduledDAG().
|
protected |
Definition at line 359 of file ScheduleDAG.cpp.
References llvm::dbgs(), llvm::SDep::dump(), llvm::SUnit::dumpAttributes(), dumpNode(), dumpNodeName(), llvm::SDep::getSUnit(), llvm::SUnit::Preds, llvm::SUnit::Succs, and TRI.
Referenced by llvm::ScheduleDAGSDNodes::dump(), and llvm::ScheduleDAGInstrs::dump().
LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeName | ( | const SUnit & | SU | ) | const |
Definition at line 350 of file ScheduleDAG.cpp.
References llvm::dbgs(), EntrySU, ExitSU, and llvm::SUnit::NodeNum.
Referenced by llvm::ScheduleDAGSDNodes::dumpNode(), llvm::ScheduleDAGInstrs::dumpNode(), dumpNodeAll(), and fuseInstructionPair().
|
pure virtual |
Returns a label for the region of code covered by the DAG.
Implemented in llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.
Returns a label for an SUnit node in a visualization of the ScheduleDAG.
Implemented in llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.
Referenced by llvm::DOTGraphTraits< ScheduleDAG * >::addCustomGraphFeatures(), and llvm::DOTGraphTraits< ScheduleDAGMI * >::getNodeDescription().
|
inline |
Returns the MCInstrDesc of this SUnit.
Returns NULL for SDNodes without a machine opcode.
Definition at line 585 of file ScheduleDAG.h.
References llvm::SDep::dump(), llvm::MachineInstr::getDesc(), llvm::SUnit::getInstr(), llvm::SUnit::getNode(), llvm::SUnit::isInstr(), and Name.
Referenced by llvm::ScoreboardHazardRecognizer::EmitInstruction(), and llvm::ScoreboardHazardRecognizer::getHazardType().
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().
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().
|
virtual |
Out-of-line implementation with no arguments is handy for gdb.
Reimplemented in llvm::ScheduleDAGMI.
Definition at line 96 of file ScheduleDAGPrinter.cpp.
SUnit llvm::ScheduleDAG::EntrySU |
Special node for the region entry.
Definition at line 567 of file ScheduleDAG.h.
Referenced by clearDAG(), llvm::ScheduleDAGSDNodes::dump(), llvm::ScheduleDAGInstrs::dump(), dumpNodeName(), fuseInstructionPair(), and llvm::ScheduleDAGInstrs::getGraphNodeLabel().
SUnit llvm::ScheduleDAG::ExitSU |
Special node for the region exit.
Definition at line 568 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::ScheduleDAGInstrs::buildSchedGraph(), clearDAG(), llvm::ScheduleDAGSDNodes::dump(), llvm::ScheduleDAGInstrs::dump(), dumpNodeName(), fuseInstructionPair(), llvm::ScheduleDAGInstrs::getGraphNodeLabel(), llvm::GCNSubtarget::getMaxNumVGPRs(), llvm::ScheduleDAGTopologicalSort::InitDAGTopologicalSorting(), llvm::GenericScheduler::registerRoots(), and llvm::PostGenericScheduler::registerRoots().
MachineFunction& llvm::ScheduleDAG::MF |
Machine function.
Definition at line 564 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::HexagonSubtarget::CallMutation::apply(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::PPCInstrInfo::CreateTargetPostRAHazardRecognizer(), llvm::SIInstrInfo::CreateTargetPostRAHazardRecognizer(), llvm::GCNScheduleDAGMILive::finalizeSchedule(), fuseInstructionPair(), llvm::DOTGraphTraits< ScheduleDAG * >::getGraphName(), llvm::DOTGraphTraits< ScheduleDAGMI * >::getGraphName(), llvm::GCNMaxOccupancySchedStrategy::initialize(), llvm::PostGenericScheduler::initialize(), llvm::GCNIterativeScheduler::printRegions(), llvm::GCNIterativeScheduler::printSchedRP(), llvm::GCNIterativeScheduler::schedule(), llvm::GCNIterativeScheduler::scheduleILP(), llvm::GCNIterativeScheduler::scheduleLegacyMaxOccupancy(), llvm::GCNIterativeScheduler::scheduleMinReg(), llvm::GCNIterativeScheduler::scheduleRegion(), llvm::GCNIterativeScheduler::sortRegionsByPressure(), llvm::GenericScheduler::tryCandidate(), and llvm::GCNIterativeScheduler::tryMaximizeOccupancy().
MachineRegisterInfo& llvm::ScheduleDAG::MRI |
Virtual/real register map.
Definition at line 565 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::ScheduleDAGInstrs::getLaneMaskForMO(), ProcessSourceNode(), llvm::GCNScheduleDAGMILive::schedule(), and llvm::GCNIterativeScheduler::scheduleRegion().
bool llvm::ScheduleDAG::StressSched |
Definition at line 573 of file ScheduleDAG.h.
Referenced by ScheduleDAG().
std::vector<SUnit> llvm::ScheduleDAG::SUnits |
The scheduling units.
Definition at line 566 of file ScheduleDAG.h.
Referenced by llvm::HexagonSubtarget::UsrOverflowMutation::apply(), llvm::HexagonSubtarget::HVXMemLatencyMutation::apply(), llvm::HexagonSubtarget::CallMutation::apply(), llvm::HexagonSubtarget::BankConflictMutation::apply(), llvm::ScheduleDAGInstrs::buildSchedGraph(), clearDAG(), llvm::createCopyConstrainDAGMutation(), llvm::ScheduleDAGSDNodes::dump(), llvm::ScheduleDAGInstrs::dump(), llvm::SMSchedule::finalizeSchedule(), fuseInstructionPair(), llvm::GCNSubtarget::getMaxNumVGPRs(), llvm::ScheduleDAGTopologicalSort::GetSubGraph(), hasDataDependencyPred(), llvm::SchedRemainder::init(), llvm::ScheduleDAGTopologicalSort::InitDAGTopologicalSorting(), llvm::ScheduleDAGInstrs::initSUnits(), llvm::SIScheduleBlockCreator::isSUInBlock(), llvm::SMSchedule::isValidSchedule(), llvm::ScheduleDAGSDNodes::newSUnit(), llvm::GraphTraits< ScheduleDAG * >::nodes_begin(), llvm::GraphTraits< ScheduleDAG * >::nodes_end(), llvm::VLIWPacketizerList::PacketizeMIs(), llvm::R600SchedStrategy::pickNode(), llvm::ScheduleDAGInstrs::reduceHugeMemNodeMaps(), llvm::ScheduleDAGTopologicalSort::RemovePred(), llvm::GCNIterativeScheduler::OverrideLegacyStrategy::restoreOrder(), llvm::SIScheduleDAGMI::restoreSULinksLeft(), llvm::SIScheduleDAGMI::schedule(), llvm::SIScheduleDAGMI::SIScheduleDAGMI(), swapAntiDependences(), and VerifyScheduledDAG().
const TargetInstrInfo* llvm::ScheduleDAG::TII |
Target instruction information.
Definition at line 562 of file ScheduleDAG.h.
Referenced by llvm::HexagonSubtarget::HVXMemLatencyMutation::apply(), llvm::HexagonSubtarget::BankConflictMutation::apply(), llvm::ScheduleDAGSDNodes::computeLatency(), llvm::ScheduleDAGSDNodes::computeOperandLatency(), createGCNMaxOccupancyMachineScheduler(), llvm::createGenericSchedLive(), llvm::PPCInstrInfo::CreateTargetPostRAHazardRecognizer(), createVLIWMachineSched(), llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::ScheduleDAGSDNodes::EmitSchedule(), fuseInstructionPair(), llvm::GCNTargetMachine::getTargetTransformInfo(), llvm::PPCHazardRecognizer970::PPCHazardRecognizer970(), ProcessSourceNode(), and llvm::SIScheduleDAGMI::SIScheduleDAGMI().
const LLVMTargetMachine& llvm::ScheduleDAG::TM |
Target processor.
Definition at line 561 of file ScheduleDAG.h.
const TargetRegisterInfo* llvm::ScheduleDAG::TRI |
Target processor register info.
Definition at line 563 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::buildSchedGraph(), createGCNMaxOccupancyMachineScheduler(), llvm::createGenericSchedLive(), createVLIWMachineSched(), dumpNodeAll(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::ScheduleDAGInstrs::getLaneMaskForMO(), llvm::GCNTargetMachine::getTargetTransformInfo(), llvm::PostGenericScheduler::initialize(), llvm::GCNScheduleDAGMILive::schedule(), llvm::SIScheduleDAGMI::schedule(), llvm::GCNIterativeScheduler::scheduleRegion(), and llvm::SIScheduleDAGMI::SIScheduleDAGMI().