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

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_ANALYSIS_LAZYVALUEINFO_H

15#define LLVM_ANALYSIS_LAZYVALUEINFO_H

16

20

21namespace llvm {

22 class AssumptionCache;

25 class DataLayout;

26 class DominatorTree;

27 class Instruction;

29 class Use;

30 class LazyValueInfoImpl;

31

39

42

43 public:

47 : AC(AC_), DL(DL_) {}

49 : AC(Arg.AC), DL(Arg.DL), PImpl(Arg.PImpl) {

50 Arg.PImpl = nullptr;

51 }

54 AC = Arg.AC;

55 DL = Arg.DL;

56 PImpl = Arg.PImpl;

57 Arg.PImpl = nullptr;

58 return *this;

59 }

60

61

62

63

64

65

69

70

71

72

73

76

77

78

79

80

81

84

85

86

88

89

90

91

93 bool UndefAllowed);

94

95

96

98

99

100

103

104

105

106

110

111

112

115

116

118

119

121

122

124

125

126

127

129

130

132

133

136 };

137

138

140public:

143

144private:

147};

148

149

151 : public PassInfoMixin {

153

154public:

156

158

160};

161

162

166public:

170 assert(!Info.PImpl && "releaseMemory not called");

171 }

172

174

178private:

180};

181

182}

183

184#endif

185

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

This header defines various interfaces for pass management in LLVM.

FunctionAnalysisManager FAM

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

API to communicate dependencies between analyses during invalidation.

A container for analyses that lazily runs them and caches their results.

Represent the analysis usage information of a pass.

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

LLVM Basic Block Representation.

Predicate

This enumeration lists the possible predicates for CmpInst subclasses.

This class represents a range of values.

This is an important base class in LLVM.

A parsed version of the target data layout string in and methods for querying it.

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

FunctionPass class - This class is used to implement most global optimizations.

Analysis to compute lazy value information.

Result run(Function &F, FunctionAnalysisManager &FAM)

Printer pass for the LazyValueAnalysis results.

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)

LazyValueInfoPrinterPass(raw_ostream &OS)

Wrapper around LazyValueInfo.

bool runOnFunction(Function &F) override

runOnFunction - Virtual method overriden by subclasses to do the per-function processing 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...

~LazyValueInfoWrapperPass() override

void getAnalysisUsage(AnalysisUsage &AU) const override

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

LazyValueInfoWrapperPass()

This pass computes, caches, and vends lazy value constraint information.

LazyValueInfo & operator=(LazyValueInfo &&Arg)

LazyValueInfo(AssumptionCache *AC_, const DataLayout *DL_)

void eraseBlock(BasicBlock *BB)

Inform the analysis cache that we have erased a block.

ConstantRange getConstantRangeAtUse(const Use &U, bool UndefAllowed)

Return the ConstantRange constraint that is known to hold for the value at a specific use-site.

ConstantRange getConstantRange(Value *V, Instruction *CxtI, bool UndefAllowed)

Return the ConstantRange constraint that is known to hold for the specified value at the specified in...

LazyValueInfo(LazyValueInfo &&Arg)

void threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc)

Inform the analysis cache that we have threaded an edge from PredBB to OldSucc to be from PredBB to N...

Constant * getPredicateOnEdge(CmpInst::Predicate Pred, Value *V, Constant *C, BasicBlock *FromBB, BasicBlock *ToBB, Instruction *CxtI=nullptr)

Determine whether the specified value comparison with a constant is known to be true or false on the ...

Constant * getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB, Instruction *CxtI=nullptr)

Determine whether the specified value is known to be a constant on the specified edge.

ConstantRange getConstantRangeOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB, Instruction *CxtI=nullptr)

Return the ConstantRage constraint that is known to hold for the specified value on the specified edg...

Constant * getConstant(Value *V, Instruction *CxtI)

Determine whether the specified value is known to be a constant at the specified instruction.

void printLVI(Function &F, DominatorTree &DTree, raw_ostream &OS)

Print the \LazyValueInfo Analysis.

void forgetValue(Value *V)

Remove information related to this value from the cache.

void clear()

Complete flush all previously computed values.

Constant * getPredicateAt(CmpInst::Predicate Pred, Value *V, Constant *C, Instruction *CxtI, bool UseBlockValue)

Determine whether the specified value comparison with a constant is known to be true or false at the ...

bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv)

Handle invalidation events in the new pass manager.

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

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

A Use represents the edge between a Value definition and its users.

LLVM Value Representation.

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

@ C

The default llvm calling convention, compatible with C.

@ BasicBlock

Various leaf nodes.

NodeAddr< UseNode * > Use

This is an optimization pass for GlobalISel generic memory operations.

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.