14 #ifndef HEXAGONASMPRINTER_H
15 #define HEXAGONASMPRINTER_H
52 std::vector<SUnit*> Packet;
55 unsigned TotalPackets;
59 SchedModel(SM), TotalPackets(0) {
64 assert(ResourcesModel &&
"Unimplemented CreateTargetScheduleState.");
72 delete ResourcesModel;
113 struct SchedCandidate {
123 SchedCandidate(): SU(NULL), SCost(0) {}
127 NoCand, NodeOrder, SingleExcess, SingleCritical, SingleMax, MultiPressure,
133 struct SchedBoundary {
148 unsigned MinReadyCycle;
151 unsigned MaxMinLatency;
156 DAG(0), SchedModel(0), Available(ID, Name+
".A"),
158 CheckPending(
false), HazardRec(0), ResourceModel(0),
159 CurrCycle(0), IssueCount(0),
160 MinReadyCycle(UINT_MAX), MaxMinLatency(0) {}
163 delete ResourceModel;
176 bool checkHazard(
SUnit *SU);
178 void releaseNode(
SUnit *SU,
unsigned ReadyCycle);
182 void bumpNode(
SUnit *SU);
184 void releasePending();
186 void removeReady(
SUnit *SU);
188 SUnit *pickOnlyChoice();
207 DAG(0), SchedModel(0), Top(
TopQID,
"TopQ"), Bot(
BotQID,
"BotQ") {}
220 return Top.ResourceModel->getTotalPackets() +
221 Bot.ResourceModel->getTotalPackets();
228 SUnit *SU, SchedCandidate &Candidate,
233 SchedCandidate &Candidate);
virtual void initialize(ScheduleDAGMI *dag)
Initialize the strategy after building the DAG for a new region.
int SchedulingCost(ReadyQueue &Q, SUnit *SU, SchedCandidate &Candidate, RegPressureDelta &Delta, bool verbose)
CandResult pickNodeFromQueue(ReadyQueue &Q, const RegPressureTracker &RPTracker, SchedCandidate &Candidate)
VLIWResourceModel(const TargetMachine &TM, const TargetSchedModel *SM)
SUnit * pickNodeBidrectional(bool &IsTopNode)
Pick the best candidate node from either the top or bottom queue.
Provide an instruction scheduling machine model to CodeGen passes.
ID
LLVM Calling Convention Representation.
virtual DFAPacketizer * CreateTargetScheduleState(const TargetMachine *, const ScheduleDAG *) const
Create machine specific model for scheduling.
initializer< Ty > init(const Ty &Val)
bool isResourceAvailable(SUnit *SU)
virtual const TargetInstrInfo * getInstrInfo() const
void traceCandidate(const char *Label, const ReadyQueue &Q, SUnit *SU, PressureChange P=PressureChange())
virtual SUnit * pickNode(bool &IsTopNode)
Pick the best node to balance the schedule. Implements MachineSchedStrategy.
virtual void releaseBottomNode(SUnit *SU)
unsigned getTotalPackets() const
virtual void schedNode(SUnit *SU, bool IsTopNode)
void postprocessDAG()
Perform platform specific DAG postprocessing.
bool reserveResources(SUnit *SU)
Keep track of available resources.
virtual void releaseTopNode(SUnit *SU)
unsigned getIssueWidth() const
Maximum number of micro-ops that may be scheduled per cycle.
ConvergingVLIWScheduler()
VLIWMachineScheduler(MachineSchedContext *C, MachineSchedStrategy *S)
SUnit - Scheduling unit. This is a node in the scheduling DAG.