LLVM: include/llvm/Analysis/PhiValues.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19#ifndef LLVM_ANALYSIS_PHIVALUES_H

20#define LLVM_ANALYSIS_PHIVALUES_H

21

29

30namespace llvm {

31

35

36

37

38

39

40

42public:

44

45

47

48

49

50

51

53

54

55

56

57

58

59

61

62

64

65

67

68

70 FunctionAnalysisManager::Invalidator &);

71

72private:

74

75

76 unsigned int NextDepthNumber = 1;

77

78

79

81

82

84

85

87

88

89

90

93 void deleted() override;

94 void allUsesReplacedWith(Value *New) override;

95

96 public:

97 PhiValuesCallbackVH(Value *V, PhiValues *PV = nullptr)

99 };

100

101

102 DenseSet<PhiValuesCallbackVH, DenseMapInfo<Value *>> TrackedValues;

103

104

106

107

108

109 void processPhi(const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);

110};

111

112

113

114

115

124

125

126

127

128

129

138

139

141 std::unique_ptr Result;

142

143public:

146

149

151 void releaseMemory() override;

152 void getAnalysisUsage(AnalysisUsage &AU) const override;

153};

154

155}

156

157#endif

This file defines the DenseMap class.

This file defines the DenseSet and SmallDenseSet classes.

static bool runOnFunction(Function &F, bool PostInlining)

This header defines various interfaces for pass management in LLVM.

This file implements a set that has insertion order iteration characteristics.

Represent the analysis usage information of a pass.

Value handle with callbacks on RAUW and destruction.

The analysis pass which yields a PhiValues.

Definition PhiValues.h:116

PhiValues Result

Definition PhiValues.h:121

LLVM_ABI PhiValues run(Function &F, FunctionAnalysisManager &)

static bool isRequired()

Definition PhiValues.h:136

LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)

PhiValuesPrinterPass(raw_ostream &OS)

Definition PhiValues.h:134

static char ID

Definition PhiValues.h:144

PhiValues & getResult()

Definition PhiValues.h:147

const PhiValues & getResult() const

Definition PhiValues.h:148

Class for calculating and caching the underlying values of phis in a function.

Definition PhiValues.h:41

LLVM_ABI void invalidateValue(const Value *V)

Notify PhiValues that the cached information using V is no longer valid.

LLVM_ABI const ValueSet & getValuesForPhi(const PHINode *PN)

Get the underlying values of a phi.

SmallSetVector< Value *, 4 > ValueSet

Definition PhiValues.h:43

LLVM_ABI bool invalidate(Function &, const PreservedAnalyses &, FunctionAnalysisManager::Invalidator &)

Handle invalidation events in the new pass manager.

LLVM_ABI void releaseMemory()

Free the memory used by this class.

LLVM_ABI void print(raw_ostream &OS) const

Print out the values currently in the cache.

PhiValues(const Function &F)

Construct an empty PhiValues.

Definition PhiValues.h:46

A set of analyses that are preserved following a run of a transformation pass.

A SetVector that performs no allocations if smaller than a certain size.

LLVM Value Representation.

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.

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

A CRTP mix-in that provides informational APIs needed for analysis passes.

A special type used by analysis passes to provide an address that identifies that particular analysis...

A CRTP mix-in to automatically provide informational APIs needed for passes.