LLVM  8.0.1
Classes | Namespaces | Enumerations | Functions | Variables
ObjCARCAnalysisUtils.h File Reference

This file defines common analysis utilities used by the ObjC ARC Optimizer. More...

#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ObjCARCInstKind.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
Include dependency graph for ObjCARCAnalysisUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::objcarc::ARCMDKindCache
 A cache of MDKinds used by various ARC optimizations. More...
 

Namespaces

 llvm
 This class represents lattice values for constants.
 
 llvm::objcarc
 

Enumerations

enum  llvm::objcarc::ARCMDKindID { llvm::objcarc::ARCMDKindID::ImpreciseRelease, llvm::objcarc::ARCMDKindID::CopyOnEscape, llvm::objcarc::ARCMDKindID::NoObjCARCExceptions }
 

Functions

bool llvm::objcarc::ModuleHasARC (const Module &M)
 Test if the given module looks interesting to run ARC optimization on. More...
 
const Value * llvm::objcarc::GetUnderlyingObjCPtr (const Value *V, const DataLayout &DL)
 This is a wrapper around getUnderlyingObject which also knows how to look through objc_retain and objc_autorelease calls, which we know to return their argument verbatim. More...
 
const Value * llvm::objcarc::GetUnderlyingObjCPtrCached (const Value *V, const DataLayout &DL, DenseMap< const Value *, WeakTrackingVH > &Cache)
 A wrapper for GetUnderlyingObjCPtr used for results memoization. More...
 
const Value * llvm::objcarc::GetRCIdentityRoot (const Value *V)
 The RCIdentity root of a value V is a dominating value U for which retaining or releasing U is equivalent to retaining or releasing V. More...
 
Value * llvm::objcarc::GetRCIdentityRoot (Value *V)
 Helper which calls const Value *GetRCIdentityRoot(const Value *V) and just casts away the const of the result. More...
 
Value * llvm::objcarc::GetArgRCIdentityRoot (Value *Inst)
 Assuming the given instruction is one of the special calls such as objc_retain or objc_release, return the RCIdentity root of the argument of the call. More...
 
bool llvm::objcarc::IsNullOrUndef (const Value *V)
 
bool llvm::objcarc::IsNoopInstruction (const Instruction *I)
 
bool llvm::objcarc::IsPotentialRetainableObjPtr (const Value *Op)
 Test whether the given value is possible a retainable object pointer. More...
 
bool llvm::objcarc::IsPotentialRetainableObjPtr (const Value *Op, AliasAnalysis &AA)
 
ARCInstKind llvm::objcarc::GetCallSiteClass (ImmutableCallSite CS)
 Helper for GetARCInstKind. More...
 
bool llvm::objcarc::IsObjCIdentifiedObject (const Value *V)
 Return true if this value refers to a distinct and identifiable object. More...
 

Variables

bool llvm::objcarc::EnableARCOpts
 A handy option to enable/disable all ARC Optimizations. More...
 

Detailed Description

This file defines common analysis utilities used by the ObjC ARC Optimizer.

ARC stands for Automatic Reference Counting and is a system for managing reference counts for objects in Objective C.

WARNING: This file knows about certain library functions. It recognizes them by name, and hardwires knowledge of their semantics.

WARNING: This file knows about how certain Objective-C library functions are used. Naive LLVM IR transformations which would otherwise be behavior-preserving may break these assumptions.

Definition in file ObjCARCAnalysisUtils.h.