LLVM: lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H

15#define LLVM_LIB_CODEGEN_SELECTIONDAG_SCHEDULEDAGSDNODES_H

16

23#include

24#include

25#include

26

27namespace llvm {

28

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

47 public:

51

52

54

56

58

59

60

62

63

64

83

84

85

87

88

89

90

92

93

94

95

96

98

99

100

102

103

104

106

108 unsigned OpIdx, SDep& dep) const;

109

110

111

112

114

115

116

118

119

120

121

124

126 void dump() const override;

128

130

131 std::string getDAGName() const override;

132

134

135

136

137

141 unsigned DefIdx = 0;

142 unsigned NodeNumDefs = 0;

143 MVT ValueType;

144

145 public:

147

148 bool IsValid() const { return Node != nullptr; }

149

152 return ValueType;

153 }

154

158

160 return DefIdx-1;

161 }

162

164

165 private:

166 void InitNodeNumDefs();

167 };

168

169 protected:

170

171

172

174

175 private:

176

177

178 void ClusterNeighboringLoads(SDNode *Node);

179

180

181 void ClusterNodes();

182

183

184 void BuildSchedUnits();

185 void AddSchedEdges();

186

187 void EmitPhysRegCopy(SUnit *SU,

190 };

191

192}

193

194#endif

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.

unsigned GetIdx() const

Definition ScheduleDAGSDNodes.h:159

RegDefIter(const SUnit *SU, const ScheduleDAGSDNodes *SD)

bool IsValid() const

Definition ScheduleDAGSDNodes.h:148

MVT GetValue() const

Definition ScheduleDAGSDNodes.h:150

const SDNode * GetNode() const

Definition ScheduleDAGSDNodes.h:155

virtual void getCustomGraphFeatures(GraphWriter< ScheduleDAG * > &GW) const

SUnit * newSUnit(SDNode *N)

NewSUnit - Creates a new SUnit and return a ptr to it.

SelectionDAG * DAG

Definition ScheduleDAGSDNodes.h:49

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.

Definition ScheduleDAGSDNodes.h:173

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.

Definition ScheduleDAGSDNodes.h:65

const InstrItineraryData * InstrItins

Definition ScheduleDAGSDNodes.h:50

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.

Definition ScheduleDAGSDNodes.h:53

MachineBasicBlock * BB

Definition ScheduleDAGSDNodes.h:48

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 - Return true if the parameter to the template is an instance of one of the template type argu...