LLVM API Documentation

Namespaces | Enumerations | Functions | Variables
lib/Transforms/ObjCARC/ObjCARC.h File Reference
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/ObjCARC.h"
#include "llvm/Transforms/Utils/Local.h"
Include dependency graph for lib/Transforms/ObjCARC/ObjCARC.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  llvm
 

List of target independent CodeGen pass IDs.


namespace  llvm::objcarc

Enumerations

enum  llvm::objcarc::InstructionClass {
  llvm::objcarc::IC_Retain, llvm::objcarc::IC_RetainRV, llvm::objcarc::IC_RetainBlock, llvm::objcarc::IC_Release,
  llvm::objcarc::IC_Autorelease, llvm::objcarc::IC_AutoreleaseRV, llvm::objcarc::IC_AutoreleasepoolPush, llvm::objcarc::IC_AutoreleasepoolPop,
  llvm::objcarc::IC_NoopCast, llvm::objcarc::IC_FusedRetainAutorelease, llvm::objcarc::IC_FusedRetainAutoreleaseRV, llvm::objcarc::IC_LoadWeakRetained,
  llvm::objcarc::IC_StoreWeak, llvm::objcarc::IC_InitWeak, llvm::objcarc::IC_LoadWeak, llvm::objcarc::IC_MoveWeak,
  llvm::objcarc::IC_CopyWeak, llvm::objcarc::IC_DestroyWeak, llvm::objcarc::IC_StoreStrong, llvm::objcarc::IC_IntrinsicUser,
  llvm::objcarc::IC_CallOrUser, llvm::objcarc::IC_Call, llvm::objcarc::IC_User, llvm::objcarc::IC_None
}
 A simple classification for instructions. More...

Functions

static bool llvm::objcarc::ModuleHasARC (const Module &M)
 Test if the given module looks interesting to run ARC optimization on.
raw_ostreamllvm::objcarc::operator<< (raw_ostream &OS, const InstructionClass Class)
static bool llvm::objcarc::IsUser (InstructionClass Class)
 Test if the given class is a kind of user.
static bool llvm::objcarc::IsRetain (InstructionClass Class)
 Test if the given class is objc_retain or equivalent.
static bool llvm::objcarc::IsAutorelease (InstructionClass Class)
 Test if the given class is objc_autorelease or equivalent.
static bool llvm::objcarc::IsForwarding (InstructionClass Class)
 Test if the given class represents instructions which return their argument verbatim.
static bool llvm::objcarc::IsNoopOnNull (InstructionClass Class)
 Test if the given class represents instructions which do nothing if passed a null pointer.
static bool llvm::objcarc::IsAlwaysTail (InstructionClass Class)
 Test if the given class represents instructions which are always safe to mark with the "tail" keyword.
static bool llvm::objcarc::IsNeverTail (InstructionClass Class)
 Test if the given class represents instructions which are never safe to mark with the "tail" keyword.
static bool llvm::objcarc::IsNoThrow (InstructionClass Class)
 Test if the given class represents instructions which are always safe to mark with the nounwind attribute.
static bool llvm::objcarc::CanInterruptRV (InstructionClass Class)
InstructionClass llvm::objcarc::GetFunctionClass (const Function *F)
 Determine if F is one of the special known Functions. If it isn't, return IC_CallOrUser.
static InstructionClass llvm::objcarc::GetBasicInstructionClass (const Value *V)
 Determine which objc runtime call instruction class V belongs to.
InstructionClass llvm::objcarc::GetInstructionClass (const Value *V)
 Determine what kind of construct V is.
static 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.
static const Value * llvm::objcarc::StripPointerCastsAndObjCCalls (const Value *V)
 This is a wrapper around Value::stripPointerCasts which also knows how to look through objc_retain and objc_autorelease calls, which we know to return their argument verbatim.
static Value * llvm::objcarc::StripPointerCastsAndObjCCalls (Value *V)
 This is a wrapper around Value::stripPointerCasts which also knows how to look through objc_retain and objc_autorelease calls, which we know to return their argument verbatim.
static Value * llvm::objcarc::GetObjCArg (Value *Inst)
 Assuming the given instruction is one of the special calls such as objc_retain or objc_release, return the argument value, stripped of no-op casts and forwarding calls.
static bool llvm::objcarc::IsNullOrUndef (const Value *V)
static bool llvm::objcarc::IsNoopInstruction (const Instruction *I)
static void llvm::objcarc::EraseInstruction (Instruction *CI)
 Erase the given instruction.
static bool llvm::objcarc::IsPotentialRetainableObjPtr (const Value *Op)
 Test whether the given value is possible a retainable object pointer.
static bool llvm::objcarc::IsPotentialRetainableObjPtr (const Value *Op, AliasAnalysis &AA)
static InstructionClass llvm::objcarc::GetCallSiteClass (ImmutableCallSite CS)
 Helper for GetInstructionClass. Determines what kind of construct CS is.
static bool llvm::objcarc::IsObjCIdentifiedObject (const Value *V)
 Return true if this value refers to a distinct and identifiable object.

Variables

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

Detailed Description

This file defines common definitions/declarations 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 lib/Transforms/ObjCARC/ObjCARC.h.