28#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINESCHEDULER_H
29#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINESCHEDULER_H
43 bool definesCmp0Src(
const MachineInstr *
MI,
bool CCDef =
true)
const;
47 unsigned LivenessHeightCutOff;
87 int ResourcesCost = 0;
89 Candidate() =
default;
97 return (GroupingCost <= 0 && !ResourcesCost);
102 if (GroupingCost != 0)
103 dbgs() <<
" Grouping cost:" << GroupingCost;
104 if (ResourcesCost != 0)
105 dbgs() <<
" Resource cost:" << ResourcesCost;
113 bool operator() (
SUnit *lhs,
SUnit *rhs)
const {
128 struct SUSet : std::set<SUnit*, SUSorter> {
142 typedef std::map<MachineBasicBlock*, SystemZHazardRecognizer*> MBB2HazRec;
143 MBB2HazRec SchedStates;
160 unsigned NumRegionInstrs)
override;
GenericScheduler(const MachineSchedContext *C)
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
MachineSchedStrategy - Interface to the scheduling algorithm used by ScheduleDAGMI.
Wrapper class representing virtual and physical registers.
Scheduling unit. This is a node in the scheduling DAG.
unsigned NodeNum
Entry # of node in the node vector.
unsigned getHeight() const
Returns the height of this node, which is the length of the maximum path down to any node which has n...
bool isScheduleHigh
True if preferable to schedule high.
Each Scheduling boundary is associated with ready queues.
ScheduleDAGMILive is an implementation of ScheduleDAGInstrs that schedules machine instructions while...
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
SystemZHazardRecognizer maintains the state for one MBB during scheduling.
bool shouldTrackPressure() const override
PostRA scheduling does not track pressure.
SUnit * pickNode(bool &IsTopNode) override
Pick the next node to schedule, or return NULL.
void leaveMBB() override
Tell the strategy that current MBB is done.
void releaseBottomNode(SUnit *SU) override
Currently only scheduling top-down, so this method is empty.
~SystemZPostRASchedStrategy() override
void initPolicy(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned NumRegionInstrs) override
Called for a region before scheduling.
void schedNode(SUnit *SU, bool IsTopNode) override
ScheduleDAGMI has scheduled an instruction - tell HazardRec about it.
void initialize(ScheduleDAGMI *dag) override
Initialize the strategy after building the DAG for a new region.
void enterMBB(MachineBasicBlock *NextMBB) override
Tell the strategy that MBB is about to be processed.
bool doMBBSchedRegionsTopDown() const override
SystemZPostRASchedStrategy(const MachineSchedContext *C)
void releaseTopNode(SUnit *SU) override
SU has had all predecessor dependencies resolved.
void schedNode(SUnit *SU, bool IsTopNode) override
Update the scheduler's state after scheduling a node.
void initPolicy(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned NumRegionInstrs) override
Initialize the per-region scheduling policy.
SystemZPreRASchedStrategy(const MachineSchedContext *C)
void initialize(ScheduleDAGMI *dag) override
Initialize the strategy after building the DAG for a new region.
bool tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand, SchedBoundary *Zone) const override
Apply a set of heuristics to a new candidate.
Provide an instruction scheduling machine model to CodeGen passes.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
bool operator<(int64_t V1, const APSInt &V2)
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Store the state used by GenericScheduler heuristics, required for the lifetime of one invocation of p...
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...