LLVM: include/llvm/Analysis/InstructionPrecedenceTracking.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#ifndef LLVM_ANALYSIS_INSTRUCTIONPRECEDENCETRACKING_H

21#define LLVM_ANALYSIS_INSTRUCTIONPRECEDENCETRACKING_H

22

24

25namespace llvm {

26

28class Instruction;

29

31

32

33

35

36

38

39#ifndef NDEBUG

40

41

42

43 void validate(const BasicBlock *BB) const;

44

45

46

47

48 void validateAll() const;

49#endif

50

51protected:

52

53

55

56

57

59

60

61

63

64

65

66

67

68

70

72

73public:

74

75

76

78

79

80

82

83

84

85

87

88

90};

91

92

93

94

95

96

97

98

100public:

101

102

105 }

106

107

108

111 }

112

113

116 }

117

119};

120

122public:

123

124

127 }

128

129

130

133 }

134

135

136

139 }

140

142};

143

144}

145

146#endif

SmallVector< AArch64_IMM::ImmInsnModel, 4 > Insn

This file defines the DenseMap class.

LLVM Basic Block Representation.

This class allows to keep track on instructions with implicit control flow.

const Instruction * getFirstICFI(const BasicBlock *BB)

Returns the topmost instruction with implicit control flow from the given basic block.

bool isDominatedByICFIFromSameBlock(const Instruction *Insn)

Returns true if the first ICFI of Insn's block exists and dominates Insn.

bool hasICF(const BasicBlock *BB)

Returns true if at least one instruction from the given basic block has implicit control flow.

bool isSpecialInstruction(const Instruction *Insn) const override

A predicate that defines whether or not the instruction Insn is considered special and needs to be tr...

void clear()

Invalidates all information from this tracking.

void removeUsersOf(const Instruction *Inst)

Notifies this tracking that we are going to replace all uses of Inst.

virtual ~InstructionPrecedenceTracking()=default

void insertInstructionTo(const Instruction *Inst, const BasicBlock *BB)

Notifies this tracking that we are going to insert a new instruction Inst to the basic block BB.

void removeInstruction(const Instruction *Inst)

Notifies this tracking that we are going to remove the instruction Inst It makes all necessary update...

const Instruction * getFirstSpecialInstruction(const BasicBlock *BB)

Returns the topmost special instruction from the block BB.

virtual bool isSpecialInstruction(const Instruction *Insn) const =0

A predicate that defines whether or not the instruction Insn is considered special and needs to be tr...

bool hasSpecialInstructions(const BasicBlock *BB)

Returns true iff at least one instruction from the basic block BB is special.

bool isPreceededBySpecialInstruction(const Instruction *Insn)

Returns true iff the first special instruction of Insn's block exists and dominates Insn.

bool mayWriteToMemory(const BasicBlock *BB)

Returns true if at least one instruction from the given basic block may write memory.

bool isDominatedByMemoryWriteFromSameBlock(const Instruction *Insn)

Returns true if the first memory writing instruction of Insn's block exists and dominates Insn.

bool isSpecialInstruction(const Instruction *Insn) const override

A predicate that defines whether or not the instruction Insn is considered special and needs to be tr...

const Instruction * getFirstMemoryWrite(const BasicBlock *BB)

Returns the topmost instruction that may write memory from the given basic block.

@ BasicBlock

Various leaf nodes.

This is an optimization pass for GlobalISel generic memory operations.