15 #ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H
16 #define LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H
56 if (isa<ConstantSDNode>(Node))
return true;
57 if (isa<ConstantFPSDNode>(Node))
return true;
58 if (isa<RegisterSDNode>(Node))
return true;
59 if (isa<RegisterMaskSDNode>(Node))
return true;
60 if (isa<GlobalAddressSDNode>(Node))
return true;
61 if (isa<BasicBlockSDNode>(Node))
return true;
62 if (isa<FrameIndexSDNode>(Node))
return true;
63 if (isa<ConstantPoolSDNode>(Node))
return true;
64 if (isa<TargetIndexSDNode>(Node))
return true;
65 if (isa<JumpTableSDNode>(Node))
return true;
66 if (isa<ExternalSymbolSDNode>(Node))
return true;
67 if (isa<MCSymbolSDNode>(Node))
return true;
68 if (isa<BlockAddressSDNode>(Node))
return true;
70 isa<MDNodeSDNode>(Node))
return true;
104 unsigned OpIdx,
SDep& dep)
const;
138 unsigned NodeNumDefs;
143 bool IsValid()
const {
return Node !=
nullptr; }
146 assert(
IsValid() &&
"bad iterator");
160 void InitNodeNumDefs();
172 void ClusterNeighboringLoads(
SDNode *Node);
178 void BuildSchedUnits();
179 void AddSchedEdges();
const SDNode * GetNode() const
virtual void computeOperandLatency(SDNode *Def, SDNode *Use, unsigned OpIdx, SDep &dep) const
virtual void getCustomGraphFeatures(GraphWriter< ScheduleDAG * > &GW) const
unsigned getOpcode() const
Return the SelectionDAG opcode value for this node.
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.
A Use represents the edge between a Value definition and its users.
void dumpSchedule() const
ScheduleDAGSDNodes(MachineFunction &mf)
void InitVRegCycleFlag(SUnit *SU)
InitVRegCycleFlag - Set isVRegCycle if this node's single use is CopyToReg and its only active data o...
std::string getDAGName() const override
Return the basic block label.
Itinerary data supplied by a subtarget to be used by a target.
SUnit * Clone(SUnit *N)
Clone - Creates a clone of the specified SUnit.
void dumpNode(const SUnit *SU) const override
SDep - Scheduling dependency.
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.
MVT - Machine Value Type.
~ScheduleDAGSDNodes() override
bundle_iterator - MachineBasicBlock iterator that automatically skips over MIs that are inside bundle...
const InstrItineraryData * InstrItins
virtual void computeLatency(SUnit *SU)
computeLatency - Compute node latency.
RegDefIter - In place iteration over the values defined by an SUnit.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
Represents one node in the SelectionDAG.
std::string getGraphNodeLabel(const SUnit *SU) const override
getGraphNodeLabel - Return 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.
virtual MachineBasicBlock * EmitSchedule(MachineBasicBlock::iterator &InsertPos)
EmitSchedule - Insert MachineInstrs into the MachineBasicBlock according to the order specified in Se...
virtual bool forceUnitLatencies() const
ForceUnitLatencies - Return true if all scheduling edges should be given a latency value of one...
virtual void Schedule()=0
Schedule - Order nodes according to selected style, filling in the Sequence member.
SUnit - 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...