LLVM: lib/Target/SystemZ/SystemZHazardRecognizer.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZHAZARDRECOGNIZER_H

31#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZHAZARDRECOGNIZER_H

32

40#include

41

42namespace llvm {

43

44

46

49

50

51

52 unsigned CurrGroupSize;

53

54

55

56 bool CurrGroupHas4RegOps;

57

58

59

60

61

62

63

64

66

67

68

69 unsigned CriticalResourceIdx;

70

71

72 inline unsigned getNumDecoderSlots(SUnit *SU) const;

73

74

75 bool fitsIntoCurrentGroup(SUnit *SU) const;

76

77

79

80

81

82

83

84

85 unsigned getCurrCycleIdx(SUnit *SU = nullptr) const;

86

87

88

89 unsigned LastFPdOpCycleIdx;

90

91

92 unsigned GrpCount;

93

94 unsigned getCurrGroupSize() {return CurrGroupSize;};

95

96

97 void nextGroup();

98

99

100 void clearProcResCounters();

101

102

103

104 bool isFPdOpPreferred_distance(SUnit *SU) const;

105

106

108

109public:

112 : TII(tii), SchedModel(SM) {

114 }

115

117 void Reset() override;

119

120

122 if (!SU->SchedClass && SchedModel->hasInstrSchedModel())

125 }

126

127

129

130

131

132

133

134

135

136

138

139

140

141

143

144#ifndef NDEBUG

145

151#endif

152

154

155

157};

158

159}

160

161#endif

This file defines the SmallVector class.

MachineInstrBundleIterator< MachineInstr > iterator

Representation of each machine instruction.

Scheduling unit. This is a node in the scheduling DAG.

const MCSchedClassDesc * SchedClass

nullptr or resolved SchedClass.

MachineInstr * getInstr() const

Returns the representative MachineInstr for this SUnit.

ScheduleHazardRecognizer()=default

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

SystemZHazardRecognizer maintains the state for one MBB during scheduling.

Definition SystemZHazardRecognizer.h:45

int groupingCost(SUnit *SU) const

Return the cost of decoder grouping for SU.

void dumpProcResourceCounters() const

void emitInstruction(MachineInstr *MI, bool TakenBranch=false)

Wrap a non-scheduled instruction in an SU and emit it.

const MCSchedClassDesc * getSchedClass(SUnit *SU) const

Resolves and cache a resolved scheduling class for an SUnit.

Definition SystemZHazardRecognizer.h:121

void copyState(SystemZHazardRecognizer *Incoming)

Copy counters from end of single predecessor.

void Reset() override

Reset - This callback is invoked when a new block of instructions is about to be schedule.

void dumpSU(SUnit *SU, raw_ostream &OS) const

HazardType getHazardType(SUnit *SU, int Stalls=0) override

getHazardType - Return the hazard type of emitting this node.

MachineBasicBlock::iterator getLastEmittedMI()

Definition SystemZHazardRecognizer.h:153

void dumpCurrGroup(std::string Msg="") const

int resourcesCost(SUnit *SU)

Return the cost of SU in regards to processor resources usage.

std::string CurGroupDbg

Definition SystemZHazardRecognizer.h:146

void EmitInstruction(SUnit *SU) override

EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard stat...

SystemZHazardRecognizer(const SystemZInstrInfo *tii, const TargetSchedModel *SM)

Definition SystemZHazardRecognizer.h:110

Provide an instruction scheduling machine model to CodeGen passes.

This class implements an extremely fast bulk output stream that can only output to a stream.

This is an optimization pass for GlobalISel generic memory operations.

Incoming for lane maks phi as machine instruction, incoming register Reg and incoming block Block are...

Summarize the scheduling resources required for an instruction of a particular scheduling class.