class SchedBoundary
Declaration
class SchedBoundary { /* full declaration omitted */ };
Description
Each Scheduling boundary is associated with ready queues. It tracks the current cycle in the direction of movement, and maintains the state of "hazards" and other interlocks at the current cycle.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:604
Member Variables
- public llvm::ScheduleDAGMI* DAG = nullptr
- public const llvm::TargetSchedModel* SchedModel = nullptr
- public llvm::SchedRemainder* Rem = nullptr
- public llvm::ReadyQueue Available
- public llvm::ReadyQueue Pending
- public llvm::ScheduleHazardRecognizer* HazardRec = nullptr
Method Overview
- public SchedBoundary(unsigned int ID, const llvm::Twine & Name)
- public void bumpCycle(unsigned int NextCycle)
- public void bumpNode(llvm::SUnit * SU)
- public bool checkHazard(llvm::SUnit * SU)
- public unsigned int countResource(unsigned int PIdx, unsigned int Cycles, unsigned int ReadyCycle)
- public void dumpScheduledState() const
- public unsigned int findMaxLatency(ArrayRef<llvm::SUnit *> ReadySUs)
- public unsigned int getCriticalCount() const
- public unsigned int getCurrCycle() const
- public unsigned int getCurrMOps() const
- public unsigned int getDependentLatency() const
- public unsigned int getExecutedCount() const
- public unsigned int getLatencyStallCycles(llvm::SUnit * SU)
- public std::pair<unsigned int, unsigned int> getNextResourceCycle(unsigned int PIdx, unsigned int Cycles)
- public unsigned int getNextResourceCycleByInstance(unsigned int InstanceIndex, unsigned int Cycles)
- public unsigned int getOtherResourceCount(unsigned int & OtherCritIdx)
- public unsigned int getResourceCount(unsigned int ResIdx) const
- public unsigned int getScheduledLatency() const
- public unsigned int getUnscheduledLatency(llvm::SUnit * SU) const
- public unsigned int getZoneCritResIdx() const
- public void incExecutedResources(unsigned int PIdx, unsigned int Count)
- public void init(llvm::ScheduleDAGMI * dag, const llvm::TargetSchedModel * smodel, llvm::SchedRemainder * rem)
- public bool isResourceLimited() const
- public bool isTop() const
- public llvm::SUnit * pickOnlyChoice()
- public void releaseNode(llvm::SUnit * SU, unsigned int ReadyCycle, bool InPQueue, unsigned int Idx = 0)
- public void releasePending()
- public void removeReady(llvm::SUnit * SU)
- public void reset()
- public ~SchedBoundary()
Methods
¶SchedBoundary(unsigned int ID,
const llvm::Twine& Name)
SchedBoundary(unsigned int ID,
const llvm::Twine& Name)
Description
Pending queues extend the ready queues with the same ID and the PendingFlag set.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:683
Parameters
- unsigned int ID
- const llvm::Twine& Name
¶void bumpCycle(unsigned int NextCycle)
void bumpCycle(unsigned int NextCycle)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:771
Parameters
- unsigned int NextCycle
¶void bumpNode(llvm::SUnit* SU)
void bumpNode(llvm::SUnit* SU)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:777
Parameters
- llvm::SUnit* SU
¶bool checkHazard(llvm::SUnit* SU)
bool checkHazard(llvm::SUnit* SU)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:754
Parameters
- llvm::SUnit* SU
¶unsigned int countResource(
unsigned int PIdx,
unsigned int Cycles,
unsigned int ReadyCycle)
unsigned int countResource(
unsigned int PIdx,
unsigned int Cycles,
unsigned int ReadyCycle)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:775
Parameters
- unsigned int PIdx
- unsigned int Cycles
- unsigned int ReadyCycle
¶void dumpScheduledState() const
void dumpScheduledState() const
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:788
¶unsigned int findMaxLatency(
ArrayRef<llvm::SUnit*> ReadySUs)
unsigned int findMaxLatency(
ArrayRef<llvm::SUnit*> ReadySUs)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:756
Parameters
- ArrayRef<llvm::SUnit*> ReadySUs
¶unsigned int getCriticalCount() const
unsigned int getCriticalCount() const
Description
Get the scaled count of scheduled micro-ops and resources, including executed resources.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:725
¶unsigned int getCurrCycle() const
unsigned int getCurrCycle() const
Description
Number of cycles to issue the instructions scheduled in this zone.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:700
¶unsigned int getCurrMOps() const
unsigned int getCurrMOps() const
Description
Micro-ops issued in the current cycle
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:703
¶unsigned int getDependentLatency() const
unsigned int getDependentLatency() const
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:706
¶unsigned int getExecutedCount() const
unsigned int getExecutedCount() const
Description
Get a scaled count for the minimum execution time of the scheduled micro-ops that are ready to execute by getExecutedCount. Notice the feedback loop.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:734
¶unsigned int getLatencyStallCycles(
llvm::SUnit* SU)
unsigned int getLatencyStallCycles(
llvm::SUnit* SU)
Description
Get the difference between the given SUnit's ready time and the current cycle.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:746
Parameters
- llvm::SUnit* SU
¶std::pair<unsigned int, unsigned int>
getNextResourceCycle(unsigned int PIdx,
unsigned int Cycles)
std::pair<unsigned int, unsigned int>
getNextResourceCycle(unsigned int PIdx,
unsigned int Cycles)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:751
Parameters
- unsigned int PIdx
- unsigned int Cycles
¶unsigned int getNextResourceCycleByInstance(
unsigned int InstanceIndex,
unsigned int Cycles)
unsigned int getNextResourceCycleByInstance(
unsigned int InstanceIndex,
unsigned int Cycles)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:748
Parameters
- unsigned int InstanceIndex
- unsigned int Cycles
¶unsigned int getOtherResourceCount(
unsigned int& OtherCritIdx)
unsigned int getOtherResourceCount(
unsigned int& OtherCritIdx)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:758
Parameters
- unsigned int& OtherCritIdx
¶unsigned int getResourceCount(
unsigned int ResIdx) const
unsigned int getResourceCount(
unsigned int ResIdx) const
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:719
Parameters
- unsigned int ResIdx
¶unsigned int getScheduledLatency() const
unsigned int getScheduledLatency() const
Description
Get the number of latency cycles "covered" by the scheduled instructions. This is the larger of the critical path within the zone and the number of cycles required to issue the instructions.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:711
¶unsigned int getUnscheduledLatency(
llvm::SUnit* SU) const
unsigned int getUnscheduledLatency(
llvm::SUnit* SU) const
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:715
Parameters
- llvm::SUnit* SU
¶unsigned int getZoneCritResIdx() const
unsigned int getZoneCritResIdx() const
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:739
¶void incExecutedResources(unsigned int PIdx,
unsigned int Count)
void incExecutedResources(unsigned int PIdx,
unsigned int Count)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:773
Parameters
- unsigned int PIdx
- unsigned int Count
¶void init(llvm::ScheduleDAGMI* dag,
const llvm::TargetSchedModel* smodel,
llvm::SchedRemainder* rem)
void init(llvm::ScheduleDAGMI* dag,
const llvm::TargetSchedModel* smodel,
llvm::SchedRemainder* rem)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:692
Parameters
- llvm::ScheduleDAGMI* dag
- const llvm::TargetSchedModel* smodel
- llvm::SchedRemainder* rem
¶bool isResourceLimited() const
bool isResourceLimited() const
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:742
¶bool isTop() const
bool isTop() const
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:695
¶llvm::SUnit* pickOnlyChoice()
llvm::SUnit* pickOnlyChoice()
Description
Call this before applying any other heuristics to the Available queue. Updates the Available/Pending Q's if necessary and returns the single available instruction, or NULL if there are multiple candidates.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:786
¶void releaseNode(llvm::SUnit* SU,
unsigned int ReadyCycle,
bool InPQueue,
unsigned int Idx = 0)
void releaseNode(llvm::SUnit* SU,
unsigned int ReadyCycle,
bool InPQueue,
unsigned int Idx = 0)
Description
Release SU to make it ready. If it's not in hazard, remove it from pending queue (if already in) and push into available queue. Otherwise, push the SU into pending queue.
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:768
Parameters
- llvm::SUnit* SU
- The unit to be released.
- unsigned int ReadyCycle
- Until which cycle the unit is ready.
- bool InPQueue
- Whether SU is already in pending queue.
- unsigned int Idx = 0
- Position offset in pending queue (if in it).
¶void releasePending()
void releasePending()
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:779
¶void removeReady(llvm::SUnit* SU)
void removeReady(llvm::SUnit* SU)
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:781
Parameters
- llvm::SUnit* SU
¶void reset()
void reset()
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:690
¶~SchedBoundary()
~SchedBoundary()
Declared at: llvm/include/llvm/CodeGen/MachineScheduler.h:688