LLVM: include/llvm/CodeGen/ScoreboardHazardRecognizer.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H

16#define LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H

17

20#include

21#include

22#include

23

24namespace llvm {

25

28

30

31

32

33

34

35

36

37

38

39 class Scoreboard {

41

42

43

44

46

47

48 size_t Head = 0;

49

50 public:

51 Scoreboard() = default;

52 Scoreboard &operator=(const Scoreboard &other) = delete;

53 Scoreboard(const Scoreboard &other) = delete;

54 ~Scoreboard() {

55 delete[] Data;

56 }

57

58 size_t getDepth() const { return Depth; }

59

61

63 "Scoreboard was not initialized properly!");

64

65 return Data[(Head + idx) & (Depth-1)];

66 }

67

68 void reset(size_t d = 1) {

72 }

73

75 Head = 0;

76 }

77

78 void advance() {

79 Head = (Head + 1) & (Depth-1);

80 }

81

82 void recede() {

83 Head = (Head - 1) & (Depth-1);

84 }

85

86

87 void dump() const;

88 };

89

90

91

92 const char *DebugType;

93

94

96

98

99

100 unsigned IssueWidth = 0;

101

102

103 unsigned IssueCount = 0;

104

105 Scoreboard ReservedScoreboard;

106 Scoreboard RequiredScoreboard;

107

108public:

111 const char *ParentDebugType = "");

112

113

114

116

117

118

120 void Reset() override;

124};

125

126}

127

128#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

uint64_t IntrinsicInst * II

Itinerary data supplied by a subtarget to be used by a target.

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

ScheduleHazardRecognizer()=default

void Reset() override

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

void EmitInstruction(SUnit *SU) override

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

void RecedeCycle() override

RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot...

HazardType getHazardType(SUnit *SU, int Stalls) override

getHazardType - Return the hazard type of emitting this node.

ScoreboardHazardRecognizer(const InstrItineraryData *II, const ScheduleDAG *DAG, const char *ParentDebugType="")

bool atIssueLimit() const override

atIssueLimit - Return true if no more instructions may be issued in this cycle.

void AdvanceCycle() override

AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot...

This is an optimization pass for GlobalISel generic memory operations.

void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)

constexpr bool has_single_bit(T Value) noexcept

FunctionAddr VTableAddr uintptr_t uintptr_t Data

uint64_t FuncUnits

Bitmask representing a set of functional units.