LLVM API Documentation
#include <MachineScheduler.h>
Classes | |
struct | CandPolicy |
Policy for scheduling the next instruction in the candidate's zone. More... | |
struct | SchedCandidate |
struct | SchedResourceDelta |
Status of an instruction's critical resource consumption. More... | |
Public Types | |
enum | CandReason { NoCand, PhysRegCopy, RegExcess, RegCritical, Stall, Cluster, Weak, RegMax, ResourceReduce, ResourceDemand, BotHeightReduce, BotPathReduce, TopDepthReduce, TopPathReduce, NextDefUse, NodeOrder } |
Static Public Member Functions | |
static const char * | getReasonStr (GenericSchedulerBase::CandReason Reason) |
Protected Member Functions | |
GenericSchedulerBase (const MachineSchedContext *C) | |
void | setPolicy (CandPolicy &Policy, bool IsPostRA, SchedBoundary &CurrZone, SchedBoundary *OtherZone) |
void | traceCandidate (const SchedCandidate &Cand) |
Protected Attributes | |
const MachineSchedContext * | Context |
const TargetSchedModel * | SchedModel |
const TargetRegisterInfo * | TRI |
SchedRemainder | Rem |
Base class for GenericScheduler. This class maintains information about scheduling candidates based on TargetSchedModel making it easy to implement heuristics for either preRA or postRA scheduling.
Definition at line 743 of file MachineScheduler.h.
Represent the type of SchedCandidate found within a single queue. pickNodeBidirectional depends on these listed by decreasing priority.
NoCand | |
PhysRegCopy | |
RegExcess | |
RegCritical | |
Stall | |
Cluster | |
Weak | |
RegMax | |
ResourceReduce | |
ResourceDemand | |
BotHeightReduce | |
BotPathReduce | |
TopDepthReduce | |
TopPathReduce | |
NextDefUse | |
NodeOrder |
Definition at line 747 of file MachineScheduler.h.
llvm::GenericSchedulerBase::GenericSchedulerBase | ( | const MachineSchedContext * | C | ) | [inline, protected] |
Definition at line 832 of file MachineScheduler.h.
const char * GenericSchedulerBase::getReasonStr | ( | GenericSchedulerBase::CandReason | Reason | ) | [static] |
Definition at line 2207 of file MachineScheduler.cpp.
References BotHeightReduce, BotPathReduce, Cluster, llvm_unreachable, NextDefUse, NoCand, NodeOrder, PhysRegCopy, RegCritical, RegExcess, RegMax, ResourceDemand, ResourceReduce, Stall, TopDepthReduce, TopPathReduce, and Weak.
Referenced by traceCandidate(), and tracePick().
void GenericSchedulerBase::setPolicy | ( | CandPolicy & | Policy, |
bool | IsPostRA, | ||
SchedBoundary & | CurrZone, | ||
SchedBoundary * | OtherZone | ||
) | [protected] |
Set the CandPolicy given a scheduling zone given the current resources and latencies inside and outside the zone.
Definition at line 2134 of file MachineScheduler.cpp.
References llvm::SchedBoundary::Available, llvm::SchedRemainder::CriticalPath, llvm::dbgs(), DEBUG, llvm::GenericSchedulerBase::CandPolicy::DemandResIdx, llvm::ReadyQueue::elements(), llvm::SchedBoundary::findMaxLatency(), llvm::SchedBoundary::getCurrCycle(), llvm::SchedBoundary::getDependentLatency(), llvm::TargetSchedModel::getLatencyFactor(), llvm::ReadyQueue::getName(), llvm::SchedBoundary::getOtherResourceCount(), llvm::TargetSchedModel::getResourceName(), llvm::SchedBoundary::getZoneCritResIdx(), llvm::TargetSchedModel::hasInstrSchedModel(), llvm::SchedBoundary::isResourceLimited(), llvm::SchedBoundary::Pending, llvm::GenericSchedulerBase::CandPolicy::ReduceLatency, llvm::GenericSchedulerBase::CandPolicy::ReduceResIdx, Rem, and SchedModel.
Referenced by llvm::PostGenericScheduler::pickNode(), and llvm::GenericScheduler::pickNodeBidirectional().
void GenericSchedulerBase::traceCandidate | ( | const SchedCandidate & | Cand | ) | [protected] |
Definition at line 2230 of file MachineScheduler.cpp.
References BotHeightReduce, BotPathReduce, llvm::RegPressureDelta::CriticalMax, llvm::RegPressureDelta::CurrentMax, llvm::dbgs(), llvm::GenericSchedulerBase::CandPolicy::DemandResIdx, llvm::RegPressureDelta::Excess, llvm::SUnit::getDepth(), llvm::SUnit::getHeight(), llvm::TargetSchedModel::getProcResource(), llvm::PressureChange::getPSet(), getReasonStr(), llvm::TargetRegisterInfo::getRegPressureSetName(), llvm::PressureChange::getUnitInc(), llvm::PressureChange::isValid(), llvm::MCProcResourceDesc::Name, llvm::SUnit::NodeNum, P, llvm::GenericSchedulerBase::SchedCandidate::Policy, llvm::GenericSchedulerBase::SchedCandidate::Reason, llvm::GenericSchedulerBase::CandPolicy::ReduceResIdx, RegCritical, RegExcess, RegMax, ResourceDemand, ResourceReduce, llvm::GenericSchedulerBase::SchedCandidate::RPDelta, SchedModel, llvm::GenericSchedulerBase::SchedCandidate::SU, TopDepthReduce, TopPathReduce, and TRI.
Referenced by llvm::GenericScheduler::pickNodeFromQueue(), and llvm::PostGenericScheduler::pickNodeFromQueue().
const MachineSchedContext* llvm::GenericSchedulerBase::Context [protected] |
Definition at line 826 of file MachineScheduler.h.
Referenced by llvm::GenericScheduler::initPolicy().
SchedRemainder llvm::GenericSchedulerBase::Rem [protected] |
Definition at line 830 of file MachineScheduler.h.
Referenced by llvm::GenericScheduler::checkAcyclicLatency(), llvm::GenericScheduler::initialize(), llvm::PostGenericScheduler::initialize(), llvm::GenericScheduler::registerRoots(), llvm::PostGenericScheduler::registerRoots(), setPolicy(), and llvm::GenericScheduler::tryCandidate().
const TargetSchedModel* llvm::GenericSchedulerBase::SchedModel [protected] |
Definition at line 827 of file MachineScheduler.h.
Referenced by llvm::GenericScheduler::checkAcyclicLatency(), llvm::GenericScheduler::initialize(), llvm::PostGenericScheduler::initialize(), llvm::GenericScheduler::pickNodeFromQueue(), llvm::PostGenericScheduler::pickNodeFromQueue(), setPolicy(), traceCandidate(), and llvm::GenericScheduler::tryCandidate().
const TargetRegisterInfo* llvm::GenericSchedulerBase::TRI [protected] |
Definition at line 828 of file MachineScheduler.h.
Referenced by llvm::GenericScheduler::initialize(), llvm::PostGenericScheduler::initialize(), llvm::GenericScheduler::reschedulePhysRegCopies(), traceCandidate(), and llvm::GenericScheduler::tryCandidate().