Go to the documentation of this file.
32 #define DEBUG_TYPE "objc-arc-aa"
57 if (UA != SA || UB != SB) {
143 "ObjC-ARC-Based Alias Analysis",
false,
true)
ARCInstKind GetBasicARCInstKind(const Value *V)
Determine which objc runtime call instruction class V belongs to.
@ NoModRef
The access neither references nor modifies the value stored in memory.
@ MayAlias
The two locations may or may not alias.
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
ImmutablePass class - This class is used to provide information that does not need to be run.
const Value * Ptr
The address of the start of the location.
ARCInstKind GetFunctionClass(const Function *F)
Determine if F is one of the special known Functions.
This is a simple alias analysis implementation that uses knowledge of ARC constructs to answer querie...
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI)
LocationSize Size
The maximum size of the location, in address-units, or UnknownSize if the size is not known.
The possible results of an alias query.
@ Autorelease
objc_autorelease
bool doInitialization(Module &M) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
FunctionModRefBehavior getModRefBehavior(const Function *F)
Legacy wrapper pass to provide the ObjCARCAAResult object.
This class stores info we want to provide to or retain within an alias query.
AAMDNodes AATags
The metadata nodes which describes the aliasing of the location (each member is null if that kind of ...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Represent the analysis usage information of a pass.
@ RetainRV
objc_retainAutoreleasedReturnValue
@ NoopCast
objc_retainedObject, etc.
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
INITIALIZE_PASS(ObjCARCAAWrapperPass, "objc-arc-aa", "ObjC-ARC-Based Alias Analysis", false, true) ImmutablePass *llvm
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI)
@ FusedRetainAutorelease
objc_retainAutorelease
A special type used by analysis passes to provide an address that identifies that particular analysis...
void initializeObjCARCAAWrapperPassPass(PassRegistry &)
ImmutablePass * createObjCARCAAWrapperPass()
bool doFinalization(Module &M) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
ModRefInfo
Flags indicating whether a memory access modifies or references memory.
bool EnableARCOpts
A handy option to enable/disable all ARC Optimizations.
A Module instance is used to store all the information related to an LLVM module.
@ FMRB_DoesNotAccessMemory
This function does not perform any non-local loads or stores to memory.
FunctionModRefBehavior getModRefBehavior(const CallBase *Call)
ObjCARCAAResult run(Function &F, FunctionAnalysisManager &AM)
const Value * GetUnderlyingObjCPtr(const Value *V)
This is a wrapper around getUnderlyingObject which also knows how to look through objc_retain and obj...
@ NoAlias
The two locations do not alias at all.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
FunctionModRefBehavior
Summary of how a function affects memory in the program.
const Value * GetRCIdentityRoot(const Value *V)
The RCIdentity root of a value V is a dominating value U for which retaining or releasing U is equiva...
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
@ AutoreleasepoolPush
objc_autoreleasePoolPush
void setPreservesAll()
Set by analyses that do not transform their input at all.
@ FusedRetainAutoreleaseRV
objc_retainAutoreleaseReturnValue
bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool OrLocal)
bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool OrLocal)
static MemoryLocation getBeforeOrAfter(const Value *Ptr, const AAMDNodes &AATags=AAMDNodes())
Return a location that may access any location before or after Ptr, while remaining within the underl...
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
A container for analyses that lazily runs them and caches their results.
LLVM Value Representation.
Representation for a specific memory location.
@ AutoreleaseRV
objc_autoreleaseReturnValue