21#define DEBUG_TYPE "NVPTX-aa"
24 "nvptx-traverse-address-aliasing-limit",
cl::Hidden,
25 cl::desc(
"Depth limit for finding address space through traversal"),
34 "NVPTX Address space based Alias Analysis",
false,
true)
59 auto GetAS = [](
const Value *V) ->
unsigned {
60 if (
const auto *PTy = dyn_cast<PointerType>(V->getType()))
61 return PTy->getAddressSpace();
106 return AS == AddressSpace::ADDRESS_SPACE_CONST ||
107 AS == AddressSpace::ADDRESS_SPACE_PARAM;
block Block Frequency Analysis
static cl::opt< unsigned > TraverseAddressSpacesLimit("nvptx-traverse-address-aliasing-limit", cl::Hidden, cl::desc("Depth limit for finding address space through traversal"), cl::init(6))
nvptx aa NVPTX Address space based Alias Analysis Wrapper
static AliasResult::Kind getAliasResult(unsigned AS1, unsigned AS2)
static bool isConstOrParam(unsigned AS)
static unsigned getAddressSpace(const Value *V, unsigned MaxLookup)
This is the NVPTX address space based alias analysis pass.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
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.
Represent the analysis usage information of a pass.
void setPreservesAll()
Set by analyses that do not transform their input at all.
ImmutablePass class - This class is used to provide information that does not need to be run.
Representation for a specific memory location.
const Value * Ptr
The address of the start of the location.
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *CtxI=nullptr)
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)
Legacy wrapper pass to provide the NVPTXAAResult object.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
LLVM Value Representation.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
const Value * getUnderlyingObject(const Value *V, unsigned MaxLookup=6)
This method strips off any GEP address adjustments, pointer casts or llvm.threadlocal....
ImmutablePass * createNVPTXExternalAAWrapperPass()
void initializeNVPTXAAWrapperPassPass(PassRegistry &)
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 * createNVPTXAAWrapperPass()
A special type used by analysis passes to provide an address that identifies that particular analysis...