LLVM  14.0.0git
Classes | Namespaces | Enumerations | Functions | Variables
ObjCARCAnalysisUtils.h File Reference
#include "llvm/ADT/Optional.h"
#include "llvm/Analysis/ObjCARCInstKind.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.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.


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


 This is an optimization pass for GlobalISel generic memory operations.


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


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)
 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, DenseMap< const Value *, std::pair< WeakVH, 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, AAResults &AA)
ARCInstKind llvm::objcarc::GetCallSiteClass (const CallBase &CB)
 Helper for GetARCInstKind. More...
bool llvm::objcarc::IsObjCIdentifiedObject (const Value *V)
 Return true if this value refers to a distinct and identifiable object. More...


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.