LLVM 20.0.0git
|
#include "llvm/CodeGen/ScheduleDAG.h"
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 LLVMTargetMachine & | 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 |
Definition at line 572 of file ScheduleDAG.h.
|
delete |
|
explicit |
Definition at line 52 of file ScheduleDAG.cpp.
References StressSched, and StressSchedOpt.
|
virtualdefault |
|
inlinevirtual |
Adds custom features for a visualization of the ScheduleDAG.
Definition at line 627 of file ScheduleDAG.h.
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(), and llvm::ScheduleDAGSDNodes::Run().
|
pure virtual |
Implemented in llvm::ScheduleDAGMILive, llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.
|
protected |
Definition at line 365 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::ScheduleDAGMILive::dump(), llvm::ScheduleDAGInstrs::dump(), and llvm::ScheduleDAGSDNodes::dump().
LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeName | ( | const SUnit & | SU | ) | const |
Definition at line 356 of file ScheduleDAG.cpp.
References llvm::dbgs(), EntrySU, ExitSU, and llvm::SUnit::NodeNum.
Referenced by llvm::ScheduleDAGInstrs::dumpNode(), llvm::ScheduleDAGSDNodes::dumpNode(), dumpNodeAll(), and llvm::fuseInstructionPair().
|
pure virtual |
Returns a label for the region of code covered by the DAG.
Implemented in llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.
Referenced by viewGraph().
Returns a label for an SUnit node in a visualization of the ScheduleDAG.
Implemented in llvm::ScheduleDAGInstrs, and llvm::ScheduleDAGSDNodes.
|
inline |
Returns the MCInstrDesc of this SUnit.
Returns NULL for SDNodes without a machine opcode.
Definition at line 607 of file ScheduleDAG.h.
References llvm::MachineInstr::getDesc(), llvm::SUnit::getInstr(), llvm::SUnit::getNode(), and llvm::SUnit::isInstr().
Referenced by llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::PPCDispatchGroupSBHazardRecognizer::EmitInstruction(), llvm::ScoreboardHazardRecognizer::getHazardType(), and llvm::PPCDispatchGroupSBHazardRecognizer::ShouldPreferAnother().
|
delete |
Verifies that all SUnits were scheduled and that their state is consistent.
Returns the number of scheduled SUnits.
Definition at line 392 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().
|
virtual |
Out-of-line implementation with no arguments is handy for gdb.
Reimplemented in llvm::ScheduleDAGMI.
Definition at line 90 of file ScheduleDAGPrinter.cpp.
References getDAGName(), and viewGraph().
Referenced by viewGraph().
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 79 of file ScheduleDAGPrinter.cpp.
References llvm::errs(), Name, and llvm::ViewGraph().
SUnit llvm::ScheduleDAG::EntrySU |
Special node for the region entry.
Definition at line 580 of file ScheduleDAG.h.
Referenced by clearDAG(), llvm::ScheduleDAGMILive::dump(), llvm::ScheduleDAGInstrs::dump(), llvm::ScheduleDAGSDNodes::dump(), dumpNodeName(), llvm::fuseInstructionPair(), llvm::SIScheduleDAGMI::getEntrySU(), llvm::ScheduleDAGInstrs::getGraphNodeLabel(), llvm::ScheduleDAGMI::initQueues(), and llvm::ScheduleDAGMI::releasePred().
SUnit llvm::ScheduleDAG::ExitSU |
Special node for the region exit.
Definition at line 581 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addEdge(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::ScheduleDAGInstrs::canAddEdge(), clearDAG(), llvm::ScheduleDAGMILive::computeCyclicCriticalPath(), llvm::ScheduleDAGMILive::dump(), llvm::ScheduleDAGInstrs::dump(), llvm::ScheduleDAGSDNodes::dump(), dumpNodeName(), llvm::ScheduleDAGMI::findRootsAndBiasEdges(), llvm::fuseInstructionPair(), llvm::SIScheduleDAGMI::getExitSU(), llvm::ScheduleDAGInstrs::getGraphNodeLabel(), llvm::ScheduleDAGMI::initQueues(), llvm::GenericScheduler::registerRoots(), llvm::PostGenericScheduler::registerRoots(), llvm::ScheduleDAGMI::releaseSucc(), and llvm::ScheduleDAGMILive::updatePressureDiffs().
MachineFunction& llvm::ScheduleDAG::MF |
Machine function.
Definition at line 577 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::HexagonSubtarget::CallMutation::apply(), llvm::SwingSchedulerDAG::applyInstrChange(), llvm::ScheduleDAGMILive::buildDAGWithRegPressure(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::SIInstrInfo::CreateTargetMIHazardRecognizer(), llvm::SIInstrInfo::CreateTargetPostRAHazardRecognizer(), llvm::PPCInstrInfo::CreateTargetPostRAHazardRecognizer(), llvm::PPCDispatchGroupSBHazardRecognizer::EmitNoop(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::SwingSchedulerDAG::finishBlock(), llvm::SwingSchedulerDAG::fixupRegisterOverlaps(), llvm::ConvergingVLIWScheduler::initialize(), llvm::GCNSchedStrategy::initialize(), llvm::R600SchedStrategy::initialize(), llvm::ScheduleDAGMILive::initRegPressure(), llvm::SIScheduleDAGMI::initRPTracker(), llvm::SwingSchedulerDAG::isLoopCarriedDep(), llvm::PPCDispatchGroupSBHazardRecognizer::PreEmitNoops(), llvm::GCNIterativeScheduler::printRegions(), llvm::GCNIterativeScheduler::printSchedRP(), llvm::SwingSchedulerDAG::schedule(), llvm::GCNIterativeScheduler::scheduleILP(), llvm::GCNIterativeScheduler::scheduleLegacyMaxOccupancy(), llvm::GCNIterativeScheduler::scheduleMinReg(), llvm::GCNIterativeScheduler::scheduleRegion(), llvm::HexagonConvergingVLIWScheduler::SchedulingCost(), llvm::GCNIterativeScheduler::sortRegionsByPressure(), llvm::GenericScheduler::tryCandidate(), llvm::GCNMaxILPSchedStrategy::tryCandidate(), llvm::PPCPreRASchedStrategy::tryCandidate(), and llvm::GCNIterativeScheduler::tryMaximizeOccupancy().
MachineRegisterInfo& llvm::ScheduleDAG::MRI |
Virtual/real register map.
Definition at line 578 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::SIScheduleDAGMI::fillVgprSgprCost(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::ScheduleDAGInstrs::getLaneMaskForMO(), llvm::SIScheduleDAGMI::getMRI(), llvm::GCNSchedStage::initGCNRegion(), llvm::R600SchedStrategy::initialize(), llvm::ScheduleDAGMILive::initRegPressure(), llvm::SwingSchedulerDAG::isLoopCarriedDep(), llvm::GCNSchedStage::revertScheduling(), llvm::ScheduleDAGMILive::scheduleMI(), llvm::GCNIterativeScheduler::scheduleRegion(), toggleKills(), and llvm::ScheduleDAGMILive::updatePressureDiffs().
bool llvm::ScheduleDAG::StressSched |
Definition at line 586 of file ScheduleDAG.h.
Referenced by ScheduleDAG().
std::vector<SUnit> llvm::ScheduleDAG::SUnits |
The scheduling units.
Definition at line 579 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(), llvm::ResourceManager::calculateResMII(), clearDAG(), llvm::SchedDFSResult::compute(), llvm::ScheduleDAGMILive::computeDFSResult(), llvm::SMSchedule::computeUnpipelineableNodes(), llvm::ScheduleDAGMILive::dump(), llvm::ScheduleDAGInstrs::dump(), llvm::ScheduleDAGSDNodes::dump(), llvm::SMSchedule::finalizeSchedule(), llvm::ScheduleDAGMI::findRootsAndBiasEdges(), llvm::fuseInstructionPair(), llvm::ScheduleDAGSDNodes::getCustomGraphFeatures(), llvm::WindowScheduler::getEstimatedII(), llvm::SchedRemainder::init(), llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::init(), llvm::ScheduleDAGMILive::initRegPressure(), llvm::ScheduleDAGInstrs::initSUnits(), llvm::SIScheduleBlockCreator::isSUInBlock(), llvm::SMSchedule::isValidSchedule(), llvm::ScheduleDAGInstrs::newSUnit(), llvm::ScheduleDAGSDNodes::newSUnit(), llvm::SMSchedule::normalizeNonPipelinedInstructions(), llvm::VLIWPacketizerList::PacketizeMIs(), llvm::R600SchedStrategy::pickNode(), llvm::ScheduleDAGInstrs::reduceHugeMemNodeMaps(), llvm::GCNIterativeScheduler::OverrideLegacyStrategy::restoreOrder(), llvm::SIScheduleDAGMI::restoreSULinksLeft(), llvm::VLIWMachineScheduler::schedule(), llvm::SIScheduleDAGMI::schedule(), llvm::UnclusteredHighRPStage::shouldRevertScheduling(), and VerifyScheduledDAG().
const TargetInstrInfo* llvm::ScheduleDAG::TII |
Target instruction information.
Definition at line 575 of file ScheduleDAG.h.
Referenced by llvm::HexagonSubtarget::HVXMemLatencyMutation::apply(), llvm::HexagonSubtarget::BankConflictMutation::apply(), llvm::SwingSchedulerDAG::applyInstrChange(), llvm::ScheduleDAGSDNodes::computeLatency(), llvm::ScheduleDAGSDNodes::computeOperandLatency(), llvm::createGenericSchedLive(), llvm::PPCInstrInfo::CreateTargetPostRAHazardRecognizer(), createVLIWMachineSched(), llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::SwingSchedulerDAG::fixupRegisterOverlaps(), llvm::fuseInstructionPair(), llvm::GenericScheduler::initialize(), llvm::PostGenericScheduler::initialize(), llvm::R600SchedStrategy::initialize(), llvm::SwingSchedulerDAG::isLoopCarriedDep(), and llvm::SIScheduleDAGMI::SIScheduleDAGMI().
const LLVMTargetMachine& llvm::ScheduleDAG::TM |
Target processor.
Definition at line 574 of file ScheduleDAG.h.
const TargetRegisterInfo* llvm::ScheduleDAG::TRI |
Target processor register info.
Definition at line 576 of file ScheduleDAG.h.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::createGenericSchedLive(), createVLIWMachineSched(), llvm::ScheduleDAGMILive::dump(), dumpNodeAll(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::ScheduleDAGInstrs::getLaneMaskForMO(), llvm::SIScheduleDAGMI::getTRI(), llvm::GenericScheduler::initialize(), llvm::PostGenericScheduler::initialize(), llvm::R600SchedStrategy::initialize(), llvm::ScheduleDAGMILive::initRegPressure(), llvm::SwingSchedulerDAG::isLoopCarriedDep(), llvm::GCNSchedStage::revertScheduling(), llvm::SIScheduleDAGMI::schedule(), llvm::ScheduleDAGMILive::scheduleMI(), llvm::GCNIterativeScheduler::scheduleRegion(), llvm::SIScheduleDAGMI::SIScheduleDAGMI(), llvm::ConvergingVLIWScheduler::traceCandidate(), llvm::ScheduleDAGMILive::updatePressureDiffs(), and llvm::ScheduleDAGMILive::updateScheduledPressure().