23 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINESCHEDULER_H 24 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINESCHEDULER_H 49 int ResourcesCost = 0;
51 Candidate() =
default;
59 return (GroupingCost <= 0 && !ResourcesCost);
64 if (GroupingCost != 0)
65 dbgs() <<
" Grouping cost:" << GroupingCost;
66 if (ResourcesCost != 0)
67 dbgs() <<
" Resource cost:" << ResourcesCost;
75 bool operator() (
SUnit *lhs,
SUnit *rhs)
const {
90 struct SUSet : std::set<SUnit*, SUSorter> {
104 typedef std::map<MachineBasicBlock*, SystemZHazardRecognizer*> MBB2HazRec;
105 MBB2HazRec SchedStates;
122 unsigned NumRegionInstrs)
override;
156 #endif // LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINESCHEDULER_H
void releaseTopNode(SUnit *SU) override
SU has had all predecessor dependencies resolved.
This class represents lattice values for constants.
SUnit * pickNode(bool &IsTopNode) override
Pick the next node to schedule, or return NULL.
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
void initialize(ScheduleDAGMI *dag) override
Initialize the strategy after building the DAG for a new region.
void initPolicy(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned NumRegionInstrs) override
Called for a region before scheduling.
Provide an instruction scheduling machine model to CodeGen passes.
virtual ~SystemZPostRASchedStrategy()
SystemZHazardRecognizer maintains the state for one MBB during scheduling.
void schedNode(SUnit *SU, bool IsTopNode) override
ScheduleDAGMI has scheduled an instruction - tell HazardRec about it.
A MachineSchedStrategy implementation for SystemZ post RA scheduling.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
bool doMBBSchedRegionsTopDown() const override
void leaveMBB() override
Tell the strategy that current MBB is done.
void enterMBB(MachineBasicBlock *NextMBB) override
Tell the strategy that MBB is about to be processed.
bool isScheduleHigh
True if preferable to schedule high.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
unsigned getHeight() const
Returns the height of this node, which is the length of the maximum path down to any node which has n...
SystemZPostRASchedStrategy(const MachineSchedContext *C)
bool shouldTrackPressure() const override
PostRA scheduling does not track pressure.
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
MachineSchedStrategy - Interface to the scheduling algorithm used by ScheduleDAGMI.
void releaseBottomNode(SUnit *SU) override
Currently only scheduling top-down, so this method is empty.
unsigned NodeNum
Entry # of node in the node vector.
bool operator<(int64_t V1, const APSInt &V2)
Scheduling unit. This is a node in the scheduling DAG.