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

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_ANALYSIS_BASICALIASANALYSIS_H

14#define LLVM_ANALYSIS_BASICALIASANALYSIS_H

15

21#include

22#include

23

24namespace llvm {

25

35

36

37

38

39

40

41

47

48

50

53 }

54

55public:

59 : DL(DL), F(F), TLI(TLI), AC(AC), DT_(DT) {}

60

62 : AAResultBase(Arg), DL(Arg.DL), F(Arg.F), TLI(Arg.TLI), AC(Arg.AC),

63 DT_(Arg.DT_) {}

66 AC(Arg.AC), DT_(Arg.DT_) {}

67

68

70 FunctionAnalysisManager::Invalidator &Inv);

71

75

77

81

84

85

86

87

88

89

90

91

94 bool IgnoreLocals = false);

95

96

98

99

102

103

104

106

107private:

108 struct DecomposedGEP;

109

110

112

113 static DecomposedGEP

116

117

118

119

120

121

122

123

124

125 bool constantOffsetHeuristic(const DecomposedGEP &GEP, LocationSize V1Size,

128

129 bool isValueEqualInPotentialCycles(const Value *V1, const Value *V2,

131

132 void subtractDecomposedGEPs(DecomposedGEP &DestGEP,

133 const DecomposedGEP &SrcGEP,

135

138 const Value *UnderlyingV1, const Value *UnderlyingV2,

140

143

147

151

155 const Value *O2);

156};

157

158

161

163

164public:

166

168};

169

170

172 std::unique_ptr Result;

173

174 virtual void anchor();

175

176public:

178

180

183

185 void getAnalysisUsage(AnalysisUsage &AU) const override;

186};

187

189

190}

191

192#endif

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

static bool runOnFunction(Function &F, bool PostInlining)

This header defines various interfaces for pass management in LLVM.

This file defines the SmallPtrSet class.

This class stores info we want to provide to or retain within an alias query.

bool UseDominatorTree

Whether alias analysis is allowed to use the dominator tree, for use by passes that lazily update the...

The possible results of an alias query.

Represent the analysis usage information of a pass.

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

This is the AA result object for the basic, local, and stateless alias analysis.

Definition BasicAliasAnalysis.h:42

LLVM_ABI AliasResult aliasErrno(const MemoryLocation &Loc, const Module *M)

BasicAAResult(const DataLayout &DL, const Function &F, const TargetLibraryInfo &TLI, AssumptionCache &AC, DominatorTree *DT=nullptr)

Definition BasicAliasAnalysis.h:56

LLVM_ABI ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)

Checks to see if the specified callsite can clobber the specified memory object.

LLVM_ABI ModRefInfo getArgModRefInfo(const CallBase *Call, unsigned ArgIdx)

Get the location associated with a pointer argument of a callsite.

BasicAAResult(BasicAAResult &&Arg)

Definition BasicAliasAnalysis.h:64

LLVM_ABI MemoryEffects getMemoryEffects(const CallBase *Call, AAQueryInfo &AAQI)

Returns the behavior when calling the given call site.

BasicAAResult(const BasicAAResult &Arg)

Definition BasicAliasAnalysis.h:61

LLVM_ABI ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals=false)

Returns a bitmask that should be unconditionally applied to the ModRef info of a memory location.

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

Handle invalidation events in the new pass manager.

LLVM_ABI AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *CtxI)

const BasicAAResult & getResult() const

Definition BasicAliasAnalysis.h:182

static char ID

Definition BasicAliasAnalysis.h:177

BasicAAResult & getResult()

Definition BasicAliasAnalysis.h:181

Analysis pass providing a never-invalidated alias analysis result.

Definition BasicAliasAnalysis.h:159

BasicAAResult Result

Definition BasicAliasAnalysis.h:165

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

Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...

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.

Representation for a specific memory location.

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.

This class represents the LLVM 'select' instruction.

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

Provides information about what library functions are available for the current target.

LLVM Value Representation.

This is an optimization pass for GlobalISel generic memory operations.

MemoryEffectsBase< IRMemLocation > MemoryEffects

Summary of how a function affects memory in the program.

LLVM_ABI FunctionPass * createBasicAAWrapperPass()

ModRefInfo

Flags indicating whether a memory access modifies or references memory.

OutputIt move(R &&Range, OutputIt Out)

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

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

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