30 #define DEBUG_TYPE "objc-arc-aa"
38 using namespace llvm::objcarc;
43 "ObjC-ARC-Based Alias Analysis",
false,
true,
false)
49 bool ObjCARCAliasAnalysis::doInitialization(
Module &M) {
55 ObjCARCAliasAnalysis::getAnalysisUsage(
AnalysisUsage &AU)
const {
79 if (UA != SA || UB != SB) {
92 bool ObjCARCAliasAnalysis::pointsToConstantMemory(
const MemoryLocation &Loc,
122 ObjCARCAliasAnalysis::getModRefBehavior(
const Function *
F) {
A Module instance is used to store all the information related to an LLVM module. ...
InstrTy * getInstruction() const
ModRefBehavior
ModRefBehavior - Summary of how a function affects memory in the program.
objc_retainedObject, etc.
static ARCInstKind GetBasicARCInstKind(const Value *V)
Determine which objc runtime call instruction class V belongs to.
The two locations do not alias at all.
The two locations may or may not alias. This is the least precise result.
virtual bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal=false)
pointsToConstantMemory - If the specified memory location is known to be constant, return true.
objc_autoreleaseReturnValue
objc_retainAutoreleasedReturnValue
bool EnableARCOpts
A handy option to enable/disable all ARC Optimizations.
This is a simple alias analysis implementation that uses knowledge of ARC constructs to answer querie...
AliasResult
The possible results of an alias query.
Represent the analysis usage information of a pass.
ARCInstKind GetFunctionClass(const Function *F)
Determine if F is one of the special known Functions.
static const Value * GetUnderlyingObjCPtr(const Value *V, const DataLayout &DL)
This is a wrapper around getUnderlyingObject which also knows how to look through objc_retain and obj...
virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS)
getModRefBehavior - Return the behavior when calling the given call site.
This file declares a simple ARC-aware AliasAnalysis using special knowledge of Objective C to enhance...
const Value * Ptr
The address of the start of the location.
Representation for a specific memory location.
ImmutablePass class - This class is used to provide information that does not need to be run...
virtual AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
Alias Queries...
ImmutablePass * createObjCARCAliasAnalysisPass()
ModRefResult getModRefInfo(const Instruction *I)
getModRefInfo - Return information about whether or not an instruction may read or write memory (with...
void InitializeAliasAnalysis(Pass *P, const DataLayout *DL)
InitializeAliasAnalysis - Subclasses must call this method to initialize the AliasAnalysis interface ...
void setPreservesAll()
Set by analyses that do not transform their input at all.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
AAMDNodes AATags
The metadata nodes which describes the aliasing of the location (each member is null if that kind of ...
ImmutableCallSite - establish a view to a call site for examination.
DoesNotAccessMemory - This function does not perform any non-local loads or stores to memory...
static 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...
objc_retainAutoreleaseReturnValue
LLVM Value Representation.
ModRefResult
Simple mod/ref information...
INITIALIZE_AG_PASS(ObjCARCAliasAnalysis, AliasAnalysis,"objc-arc-aa","ObjC-ARC-Based Alias Analysis", false, true, false) ImmutablePass *llvm
virtual void getAnalysisUsage(AnalysisUsage &AU) const
getAnalysisUsage - All alias analysis implementations should invoke this directly (using AliasAnalysi...
uint64_t Size
The maximum size of the location, in address-units, or UnknownSize if the size is not known...