LLVM: lib/Analysis/ScopedNoAliasAA.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

45

46using namespace llvm;

47

48

49

50

53

74

80

82 Call->getMetadata(LLVMContext::MD_noalias)))

84

86 Loc.AATags.NoAlias))

88

90}

91

97

99 Call2->getMetadata(LLVMContext::MD_noalias)))

101

103 Call1->getMetadata(LLVMContext::MD_noalias)))

105

107}

108

111 for (const MDOperand &MDOp : List->operands())

115}

116

117

120 if (!NoAlias)

121 return;

122 assert(Domains.empty() && "Domains should be empty");

127}

128

130 const MDNode *NoAlias) {

131 if (!Scopes || !NoAlias)

132 return true;

133

134

137

138

139

143 if (ScopeNodes.empty())

144 continue;

145

148

149

151 return false;

152 }

153

154 return true;

155}

156

158

163

165

167 "Scoped NoAlias Alias Analysis", false, true)

168

171}

172

174

179

181 Result.reset();

182 return false;

183}

184

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

This file provides utility analysis objects describing memory locations.

#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)

static void collectMDInDomain(const MDNode *List, const MDNode *Domain, SmallPtrSetImpl< const MDNode * > &Nodes)

Definition ScopedNoAliasAA.cpp:109

static cl::opt< bool > EnableScopedNoAlias("enable-scoped-noalias", cl::init(true), cl::Hidden)

This is the interface for a metadata-based scoped no-alias analysis.

This file defines generic set operations that may be used on set's of different types,...

This file defines the SmallPtrSet class.

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

The possible results of an alias query.

@ MayAlias

The two locations may or may not alias.

@ NoAlias

The two locations do not alias at all.

This is a simple wrapper around an MDNode which provides a higher-level interface by hiding the detai...

Represent the analysis usage information of a pass.

void setPreservesAll()

Set by analyses that do not transform their input at all.

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

ImmutablePass class - This class is used to provide information that does not need to be run.

MDNode * getMetadata(unsigned KindID) const

Get the metadata of given kind attached to this Instruction.

ArrayRef< MDOperand > operands() const

Tracking metadata reference owned by Metadata.

Representation for a specific memory location.

AAMDNodes AATags

The metadata nodes which describes the aliasing of the location (each member is null if that kind of ...

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

A simple AA result which uses scoped-noalias metadata to answer queries.

static LLVM_ABI bool mayAliasInScopes(const MDNode *Scopes, const MDNode *NoAlias)

Definition ScopedNoAliasAA.cpp:129

static LLVM_ABI void collectScopedDomains(const MDNode *NoAlias, SmallPtrSetImpl< const MDNode * > &Domains)

Collect the set of scoped domains relevant to the noalias scopes.

Definition ScopedNoAliasAA.cpp:118

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

Definition ScopedNoAliasAA.cpp:75

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

Definition ScopedNoAliasAA.cpp:54

Legacy wrapper pass to provide the ScopedNoAliasAAResult object.

bool doInitialization(Module &M) override

doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...

Definition ScopedNoAliasAA.cpp:175

bool doFinalization(Module &M) override

doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...

Definition ScopedNoAliasAA.cpp:180

void getAnalysisUsage(AnalysisUsage &AU) const override

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

Definition ScopedNoAliasAA.cpp:185

ScopedNoAliasAAWrapperPass()

Definition ScopedNoAliasAA.cpp:173

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

Definition ScopedNoAliasAA.cpp:159

A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...

std::pair< iterator, bool > insert(PtrType Ptr)

Inserts Ptr if and only if there is no element in the container equal to Ptr.

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

initializer< Ty > init(const Ty &Val)

This is an optimization pass for GlobalISel generic memory operations.

decltype(auto) dyn_cast(const From &Val)

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

bool set_is_subset(const S1Ty &S1, const S2Ty &S2)

set_is_subset(A, B) - Return true iff A in B

LLVM_ABI ImmutablePass * createScopedNoAliasAAWrapperPass()

ModRefInfo

Flags indicating whether a memory access modifies or references memory.

@ ModRef

The access may reference and may modify the value stored in memory.

@ NoModRef

The access neither references nor modifies the value stored in memory.

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

MDNode * Scope

The tag for alias scope specification (used with noalias).

MDNode * NoAlias

The tag specifying the noalias scope.

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