15 #ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H 16 #define LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H 30 class InstrItineraryData;
66 if (isa<ConstantSDNode>(Node))
return true;
67 if (isa<ConstantFPSDNode>(Node))
return true;
68 if (isa<RegisterSDNode>(Node))
return true;
69 if (isa<RegisterMaskSDNode>(Node))
return true;
70 if (isa<GlobalAddressSDNode>(Node))
return true;
71 if (isa<BasicBlockSDNode>(Node))
return true;
72 if (isa<FrameIndexSDNode>(Node))
return true;
73 if (isa<ConstantPoolSDNode>(Node))
return true;
74 if (isa<TargetIndexSDNode>(Node))
return true;
75 if (isa<JumpTableSDNode>(Node))
return true;
76 if (isa<ExternalSymbolSDNode>(Node))
return true;
77 if (isa<MCSymbolSDNode>(Node))
return true;
78 if (isa<BlockAddressSDNode>(Node))
return true;
80 isa<MDNodeSDNode>(Node))
return true;
108 unsigned OpIdx,
SDep& dep)
const;
126 void dump()
const override;
142 unsigned NodeNumDefs;
148 bool IsValid()
const {
return Node !=
nullptr; }
166 void InitNodeNumDefs();
178 void ClusterNeighboringLoads(
SDNode *Node);
184 void BuildSchedUnits();
185 void AddSchedEdges();
193 #endif // LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H
void dumpNode(const SUnit &SU) const override
unsigned getOpcode() const
Return the SelectionDAG opcode value for this node.
This class represents lattice values for constants.
virtual void getCustomGraphFeatures(GraphWriter< ScheduleDAG *> &GW) const
EntryToken - This is the marker used to indicate the start of a region.
void InitNumRegDefsLeft(SUnit *SU)
InitNumRegDefsLeft - Determine the # of regs defined by this node.
void dump() const override
A Use represents the edge between a Value definition and its users.
ScheduleDAGSDNodes(MachineFunction &mf)
std::string getDAGName() const override
Return the basic block label.
Itinerary data supplied by a subtarget to be used by a target.
ScheduleDAGSDNodes - A ScheduleDAG for scheduling SDNode-based DAGs.
std::vector< SUnit * > Sequence
The schedule. Null SUnit*'s represent noop instructions.
SUnit * newSUnit(SDNode *N)
NewSUnit - Creates a new SUnit and return a ptr to it.
virtual void computeOperandLatency(SDNode *Def, SDNode *Use, unsigned OpIdx, SDep &dep) const
const InstrItineraryData * InstrItins
const SDNode * GetNode() const
virtual void computeLatency(SUnit *SU)
computeLatency - Compute node latency.
RegDefIter - In place iteration over the values defined by an SUnit.
~ScheduleDAGSDNodes() override=default
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
void dumpSchedule() const
SUnit * Clone(SUnit *Old)
Clone - Creates a clone of the specified SUnit.
Represents one node in the SelectionDAG.
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.
RegDefIter(const SUnit *SU, const ScheduleDAGSDNodes *SD)
void BuildSchedGraph(AliasAnalysis *AA)
BuildSchedGraph - Build the SUnit graph from the selection dag that we are input. ...
void Run(SelectionDAG *dag, MachineBasicBlock *bb)
Run - perform scheduling.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual MachineBasicBlock * EmitSchedule(MachineBasicBlock::iterator &InsertPos)
EmitSchedule - Insert MachineInstrs into the MachineBasicBlock according to the order specified in Se...
virtual void Schedule()=0
Schedule - Order nodes according to selected style, filling in the Sequence member.
Scheduling unit. This is a node in the scheduling DAG.
void VerifyScheduledSequence(bool isBottomUp)
VerifyScheduledSequence - Verify that all SUnits are scheduled and consistent with the Sequence of sc...
A discriminated union of two pointer types, with the discriminator in the low bit of the pointer...