19#define DEBUG_TYPE "amdgpu-aa"
28 "AMDGPU Address space based Alias Analysis",
false,
true)
55#define ASMay AliasResult::MayAlias
56#define ASNo AliasResult::NoAlias
72 return ASAliasRules[AS1][AS2];
100 if (
const LoadInst *LI = dyn_cast<LoadInst>(ObjA)) {
107 }
else if (
const Argument *
Arg = dyn_cast<Argument>(ObjA)) {
109 switch (
F->getCallingConv()) {
136 AS =
Base->getType()->getPointerAddressSpace();
static AliasResult getAliasResult(unsigned AS1, unsigned AS2)
amdgpu aa AMDGPU Address space based Alias Analysis Wrapper
This is the AMGPU address space based alias analysis pass.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
block Block Frequency Analysis
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This class stores info we want to provide to or retain within an alias query.
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *I)
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *CtxI)
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)
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...
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.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
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.
@ AMDGPU_KERNEL
Used for AMDGPU code object kernels.
This is an optimization pass for GlobalISel generic memory operations.
ImmutablePass * createAMDGPUAAWrapperPass()
void initializeAMDGPUAAWrapperPassPass(PassRegistry &)
const Value * getUnderlyingObject(const Value *V, unsigned MaxLookup=6)
This method strips off any GEP address adjustments and pointer casts from the specified value,...
ModRefInfo
Flags indicating whether a memory access modifies or references memory.
@ NoModRef
The access neither references nor modifies the value stored in memory.
ImmutablePass * createAMDGPUExternalAAWrapperPass()
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...