33 #define DEBUG_TYPE "amdgpu-aa" 39 "AMDGPU Address space based Alias Analysis",
false,
true)
51 : Arch(Arch_),
AS(AS_) {
54 static const AliasResult ASAliasRulesPrivIsZero[6][6] = {
63 static const AliasResult ASAliasRulesGenIsZero[6][6] = {
79 ASAliasRules = &ASAliasRulesGenIsZero;
87 ASAliasRules = &ASAliasRulesPrivIsZero;
91 AliasResult AMDGPUAAResult::ASAliasRulesTy::getAliasResult(
unsigned AS1,
99 return (*ASAliasRules)[AS1][AS2];
107 AliasResult Result = ASAliasRules.getAliasResult(asA, asB);
108 if (Result ==
NoAlias)
return Result;
124 if (GV->isConstant())
126 }
else if (
const Argument *
Arg = dyn_cast<Argument>(Base)) {
145 unsigned ArgNo =
Arg->getArgNo();
Calling convention used for AMDPAL shader stage before geometry shader if geometry is in use...
This class represents an incoming formal argument to a Function.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Compute iterated dominance frontiers using a linear time algorithm.
bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal)
The two locations do not alias at all.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
unsigned getPointerAddressSpace() const
Get the address space of this pointer or pointer vector type.
Address space for local memory.
Calling convention used for Mesa/AMDPAL pixel shaders.
Address space for constant memory (VTX2)
OpenCL uses address spaces to differentiate between various memory regions on the hardware...
This file contains the simple types necessary to represent the attributes associated with functions a...
bool hasParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const
check if an attributes is in the list of attributes.
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
SPIR_KERNEL - Calling convention for SPIR kernel functions.
Type * getType() const
All values are typed, get the type of this value.
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
AliasResult
The possible results of an alias query.
Calling convention used for AMDPAL vertex shader if tessellation is in use.
Represent the analysis usage information of a pass.
Legacy wrapper pass to provide the AMDGPUAAResult object.
unsigned REGION_ADDRESS
Address space for region memory.
Value * GetUnderlyingObject(Value *V, const DataLayout &DL, unsigned MaxLookup=6)
This method strips off any GEP address adjustments and pointer casts from the specified value...
This is the AMGPU address space based alias analysis pass.
The two locations may or may not alias. This is the least precise result.
const Value * Ptr
The address of the start of the location.
Representation for a specific memory location.
Address space for 32-bit constant memory.
ImmutablePass class - This class is used to provide information that does not need to be run...
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
ImmutablePass * createAMDGPUAAWrapperPass()
Calling convention used for Mesa/AMDPAL compute shaders.
void setPreservesAll()
Set by analyses that do not transform their input at all.
Calling convention for AMDGPU code object kernels.
Address space for global memory (RAT0, VTX0).
amdgpu Simplify well known AMD library false Value Value * Arg
Calling convention used for Mesa/AMDPAL geometry shaders.
This file provides utility analysis objects describing memory locations.
unsigned FLAT_ADDRESS
Address space for flat memory.
INITIALIZE_PASS(AMDGPUAAWrapperPass, "amdgpu-aa", "AMDGPU Address space based Alias Analysis", false, true) ImmutablePass *llvm
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
Calling convention used for Mesa vertex shaders, or AMDPAL last shader stage before rasterization (ve...
bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal)
Calling convention used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
unsigned PRIVATE_ADDRESS
Address space for private memory.