35#define DEBUG_TYPE "objc-arc-aa"
60 if (UA != SA || UB != SB) {
This file declares a simple ARC-aware AliasAnalysis using special knowledge of Objective C to enhance...
This file defines common analysis utilities used by the ObjC ARC Optimizer.
This class stores info we want to provide to or retain within an alias query.
MemoryEffects getMemoryEffects(const CallBase *Call, AAQueryInfo &AAQI)
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *I)
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.
A container for analyses that lazily runs them and caches their results.
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
static MemoryEffectsBase none()
Create MemoryEffectsBase that cannot read or write any memory.
Representation for a specific memory location.
LocationSize Size
The maximum size of the location, in address-units, or UnknownSize if the size is not known.
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...
AAMDNodes AATags
The metadata nodes which describes the aliasing of the location (each member is null if that kind of ...
const Value * Ptr
The address of the start of the location.
LLVM Value Representation.
This is a simple alias analysis implementation that uses knowledge of ARC constructs to answer querie...
MemoryEffects getMemoryEffects(const Function *F)
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *CtxI)
ObjCARCAAResult run(Function &F, FunctionAnalysisManager &AM)
@ FusedRetainAutorelease
objc_retainAutorelease
@ AutoreleasepoolPush
objc_autoreleasePoolPush
@ Autorelease
objc_autorelease
@ RetainRV
objc_retainAutoreleasedReturnValue
@ FusedRetainAutoreleaseRV
objc_retainAutoreleaseReturnValue
@ AutoreleaseRV
objc_autoreleaseReturnValue
@ Call
could call objc_release
@ NoopCast
objc_retainedObject, etc.
ARCInstKind GetFunctionClass(const Function *F)
Determine if F is one of the special known Functions.
bool EnableARCOpts
A handy option to enable/disable all ARC Optimizations.
ARCInstKind GetBasicARCInstKind(const Value *V)
Determine which objc runtime call instruction class V belongs to.
const Value * GetUnderlyingObjCPtr(const Value *V)
This is a wrapper around getUnderlyingObject which also knows how to look through objc_retain and obj...
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...
This is an optimization pass for GlobalISel generic memory operations.
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.
bool isNoModRef(const ModRefInfo MRI)
A special type used by analysis passes to provide an address that identifies that particular analysis...