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

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_ANALYSIS_IVUSERS_H

15#define LLVM_ANALYSIS_IVUSERS_H

16

22

23namespace llvm {

24

30

31

32

33

34

37public:

39 : CallbackVH(U), Parent(P), OperandValToReplace(O) {

40 }

41

42

46

47

51

52

53

55 return OperandValToReplace;

56 }

57

58

59

61 OperandValToReplace = Op;

62 }

63

64

65

67 return PostIncLoops;

68 }

69

70

71

73

74private:

75

77

78

79

81

82

83

85

86

87

89};

90

99

100

101

103

104

106

107public:

110

114 IVUses(std::move(X.IVUses)), EphValues(std::move(X.EphValues)) {

116 U.Parent = this;

117 }

121

123

124

125

126

128

130

131

132

134

135

136

138

140

147 bool empty() const { return IVUses.empty(); }

148

150 return Processed.count(Inst);

151 }

152

154

156

157

158 void dump() const;

159};

160

162

164 std::unique_ptr IU;

165

166public:

168

170

173

175

177

179

181};

182

183

194

195}

196

197#endif

This header provides classes for managing per-loop analyses.

print mir2vec MIR2Vec Vocabulary Printer Pass

static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

Represent the analysis usage information of a pass.

A cache of @llvm.assume calls within a function.

CallbackVH(const CallbackVH &)=default

virtual void deleted()

Callback for Value destruction.

Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.

IVStrideUse - Keep track of one use of a strided induction variable.

Definition IVUsers.h:35

friend class IVUsers

Definition IVUsers.h:36

Instruction * getUser() const

getUser - Return the user instruction for this use.

Definition IVUsers.h:43

void setOperandValToReplace(Value *Op)

setOperandValToReplace - Assign a new Value as the operand value to replace.

Definition IVUsers.h:60

const PostIncLoopSet & getPostIncLoops() const

getPostIncLoops - Return the set of loops for which the expression has been adjusted to use post-inc ...

Definition IVUsers.h:66

void transformToPostInc(const Loop *L)

transformToPostInc - Transform the expression to post-inc form for the given loop.

Value * getOperandValToReplace() const

getOperandValToReplace - Return the Value of the operand in the user instruction that this IVStrideUs...

Definition IVUsers.h:54

IVStrideUse(IVUsers *P, Instruction *U, Value *O)

Definition IVUsers.h:38

void setUser(Instruction *NewUser)

setUser - Assign a new user instruction for this use.

Definition IVUsers.h:48

Analysis pass that exposes the IVUsers for a loop.

Definition IVUsers.h:184

IVUsers Result

Definition IVUsers.h:189

IVUsers run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR)

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...

bool runOnLoop(Loop *L, LPPassManager &LPM) override

void print(raw_ostream &OS, const Module *=nullptr) const override

print - Print out the internal state of the pass.

void releaseMemory() override

releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...

IVUsers & getIU()

Definition IVUsers.h:171

static char ID

Definition IVUsers.h:167

const IVUsers & getIU() const

Definition IVUsers.h:172

void dump() const

dump - This method is used for debugging.

ilist< IVStrideUse >::const_iterator const_iterator

Definition IVUsers.h:142

bool isIVUserOrOperand(Instruction *Inst) const

Definition IVUsers.h:149

iterator end()

Definition IVUsers.h:144

IVStrideUse & AddUser(Instruction *User, Value *Operand)

IVUsers(Loop *L, AssumptionCache *AC, LoopInfo *LI, DominatorTree *DT, ScalarEvolution *SE)

Loop * getLoop() const

Definition IVUsers.h:122

IVUsers & operator=(IVUsers &&)=delete

const SCEV * getStride(const IVStrideUse &IU, const Loop *L) const

IVUsers(const IVUsers &)=delete

const SCEV * getReplacementExpr(const IVStrideUse &IU) const

getReplacementExpr - Return a SCEV expression which computes the value of the OperandValToReplace of ...

IVUsers(IVUsers &&X)

Definition IVUsers.h:111

iterator begin()

Definition IVUsers.h:143

bool AddUsersIfInteresting(Instruction *I)

AddUsersIfInteresting - Inspect the specified Instruction.

friend class IVStrideUse

Definition IVUsers.h:92

const_iterator end() const

Definition IVUsers.h:146

ilist< IVStrideUse >::iterator iterator

Definition IVUsers.h:141

const_iterator begin() const

Definition IVUsers.h:145

const SCEV * getExpr(const IVStrideUse &IU) const

getExpr - Return the expression for the use.

IVUsers & operator=(const IVUsers &)=delete

void print(raw_ostream &OS, const Module *=nullptr) const

bool empty() const

Definition IVUsers.h:147

Represents a single loop in the control flow graph.

A Module instance is used to store all the information related to an LLVM module.

This class represents an analyzed expression in the program.

The main scalar evolution driver.

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

Value * getValPtr() const

LLVM Value Representation.

Value handle that is nullable, but tries to track the Value.

typename base_list_type::iterator iterator

typename base_list_type::const_iterator const_iterator

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< Loop, LoopStandardAnalysisResults & > LoopAnalysisManager

The loop analysis manager.

iplist< T, Options... > ilist

DWARFExpression::Operation Op

Pass * createIVUsersPass()

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.

SmallPtrSet< const Loop *, 2 > PostIncLoopSet

Implement std::hash so that hash_code can be used in STL containers.

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...

The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...