14#ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H
15#define LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H
126 void dump()
const override;
142 unsigned NodeNumDefs = 0;
148 bool IsValid()
const {
return Node !=
nullptr; }
166 void InitNodeNumDefs();
184 void BuildSchedUnits();
185 void AddSchedEdges();
187 void EmitPhysRegCopy(
SUnit *SU,
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineInstr unsigned OpIdx
Itinerary data supplied by a subtarget to be used by a target.
MachineInstrBundleIterator< MachineInstr > iterator
Represents one node in the SelectionDAG.
Scheduling unit. This is a node in the scheduling DAG.
RegDefIter(const SUnit *SU, const ScheduleDAGSDNodes *SD)
const SDNode * GetNode() const
virtual void getCustomGraphFeatures(GraphWriter< ScheduleDAG * > &GW) const
SUnit * newSUnit(SDNode *N)
NewSUnit - Creates a new SUnit and return a ptr to it.
void VerifyScheduledSequence(bool isBottomUp)
VerifyScheduledSequence - Verify that all SUnits are scheduled and consistent with the Sequence of sc...
virtual void Schedule()=0
Schedule - Order nodes according to selected style, filling in the Sequence member.
virtual void computeLatency(SUnit *SU)
computeLatency - Compute node latency.
std::string getDAGName() const override
Return the basic block label.
virtual MachineBasicBlock * EmitSchedule(MachineBasicBlock::iterator &InsertPos)
EmitSchedule - Insert MachineInstrs into the MachineBasicBlock according to the order specified in Se...
~ScheduleDAGSDNodes() override=default
virtual bool forceUnitLatencies() const
ForceUnitLatencies - Return true if all scheduling edges should be given a latency value of one.
std::string getGraphNodeLabel(const SUnit *SU) const override
Returns a label for an SUnit node in a visualization of the ScheduleDAG.
static bool isPassiveNode(SDNode *Node)
isPassiveNode - Return true if the node is a non-scheduled leaf.
const InstrItineraryData * InstrItins
void InitNumRegDefsLeft(SUnit *SU)
InitNumRegDefsLeft - Determine the # of regs defined by this node.
std::vector< SUnit * > Sequence
The schedule. Null SUnit*'s represent noop instructions.
void Run(SelectionDAG *dag, MachineBasicBlock *bb)
Run - perform scheduling.
void BuildSchedGraph()
BuildSchedGraph - Build the SUnit graph from the selection dag that we are input.
void dump() const override
void dumpNode(const SUnit &SU) const override
SUnit * Clone(SUnit *Old)
Clone - Creates a clone of the specified SUnit.
ScheduleDAGSDNodes(MachineFunction &mf)
void dumpSchedule() const
virtual void computeOperandLatency(SDNode *Def, SDNode *Use, unsigned OpIdx, SDep &dep) const
ScheduleDAG(const ScheduleDAG &)=delete
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
A Use represents the edge between a Value definition and its users.
@ EntryToken
EntryToken - This is the marker used to indicate the start of a region.
This is an optimization pass for GlobalISel generic memory operations.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...