LLVM: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

16

17using namespace llvm;

18

19#define DEBUG_TYPE "amdgpu-aa"

20

22

23

26

28 "AMDGPU Address space based Alias Analysis", false, true)

29

31 "AMDGPU Address space based Alias Analysis Wrapper", false, true)

32

36

40

42

46

52

55

56

57

58

59

62

66 }

69 const auto *ObjA =

72

73

74

75

79 const Function *F = Arg->getParent();

80 switch (F->getCallingConv()) {

82

83

84 const auto *ObjB =

88 }

89 default:

90

91

92

93 break;

94 }

95 }

96 }

97

99}

100

103 bool IgnoreLocals) {

104 unsigned AS = Loc.Ptr->getType()->getPointerAddressSpace();

108

110 AS = Base->getType()->getPointerAddressSpace();

114

116}

This is the AMGPU address space based alias analysis pass.

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

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

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

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

Definition AMDGPUAliasAnalysis.cpp:47

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

Definition AMDGPUAliasAnalysis.cpp:101

Legacy wrapper pass to provide the AMDGPUAAResult object.

void getAnalysisUsage(AnalysisUsage &AU) const override

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

Definition AMDGPUAliasAnalysis.cpp:43

AMDGPUAAWrapperPass()

Definition AMDGPUAliasAnalysis.cpp:41

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.

Represent the analysis usage information of a pass.

void setPreservesAll()

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

This class represents an incoming formal argument to a Function.

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

An instruction for reading from memory.

Representation for a specific memory location.

const Value * Ptr

The address of the start of the location.

LLVM_ABI unsigned getPointerAddressSpace() const

Get the address space of this pointer or pointer vector type.

LLVM Value Representation.

Type * getType() const

All values are typed, get the type of this value.

@ CONSTANT_ADDRESS_32BIT

Address space for 32-bit constant memory.

@ LOCAL_ADDRESS

Address space for local memory.

@ CONSTANT_ADDRESS

Address space for constant memory (VTX2).

@ FLAT_ADDRESS

Address space for flat memory.

@ PRIVATE_ADDRESS

Address space for private memory.

static bool addrspacesMayAlias(unsigned AS1, unsigned AS2)

@ AMDGPU_KERNEL

Used for AMDGPU code object kernels.

This is an optimization pass for GlobalISel generic memory operations.

ImmutablePass * createAMDGPUAAWrapperPass()

Definition AMDGPUAliasAnalysis.cpp:33

decltype(auto) dyn_cast(const From &Val)

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

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.

ImmutablePass * createAMDGPUExternalAAWrapperPass()

Definition AMDGPUAliasAnalysis.cpp:37

LLVM_ABI const Value * getUnderlyingObject(const Value *V, unsigned MaxLookup=MaxLookupSearchDepth)

This method strips off any GEP address adjustments, pointer casts or llvm.threadlocal....

LLVM_ABI bool isIdentifiedObject(const Value *V)

Return true if this pointer refers to a distinct and identifiable object.

void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)

Implement std::swap in terms of BitVector swap.

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