|
LLVM 22.0.0git
|
This file defines late ObjC ARC optimizations. More...
#include "ARCRuntimeEntryPoints.h"#include "DependencyAnalysis.h"#include "ObjCARC.h"#include "ProvenanceAnalysis.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/Analysis/BasicAliasAnalysis.h"#include "llvm/Analysis/ObjCARCUtil.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/EHPersonalities.h"#include "llvm/IR/InlineAsm.h"#include "llvm/IR/InstIterator.h"#include "llvm/IR/Operator.h"#include "llvm/IR/PassManager.h"#include "llvm/InitializePasses.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/TargetParser/Triple.h"#include "llvm/Transforms/ObjCARC.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "objc-arc-contract" |
Functions | |
| STATISTIC (NumPeeps, "Number of calls peephole-optimized") | |
| STATISTIC (NumStoreStrongs, "Number objc_storeStrong calls formed") | |
| static StoreInst * | findSafeStoreForStoreStrongContraction (LoadInst *Load, Instruction *Release, ProvenanceAnalysis &PA, AAResults *AA) |
| static Instruction * | findRetainForStoreStrongContraction (Value *New, StoreInst *Store, Instruction *Release, ProvenanceAnalysis &PA) |
| static bool | useClaimRuntimeCall (Module &M) |
| Should we use objc_claimAutoreleasedReturnValue? | |
| INITIALIZE_PASS_BEGIN (ObjCARCContractLegacyPass, "objc-arc-contract", "ObjC ARC contraction", false, false) INITIALIZE_PASS_END(ObjCARCContractLegacyPass | |
Variables | |
| static cl::opt< cl::boolOrDefault > | UseObjCClaimRV ("arc-contract-use-objc-claim-rv", cl::desc("Enable generation of calls to objc_claimAutoreleasedReturnValue")) |
| objc arc | contract |
| objc arc ObjC ARC | contraction |
| objc arc ObjC ARC | false |
This file defines late ObjC ARC optimizations.
ARC stands for Automatic Reference Counting and is a system for managing reference counts for objects in Objective C.
This specific file mainly deals with `‘contracting’' multiple lower level operations into singular higher level operations through pattern matching.
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 ObjCARCContract.cpp.
| #define DEBUG_TYPE "objc-arc-contract" |
Definition at line 51 of file ObjCARCContract.cpp.
|
static |
Definition at line 296 of file ObjCARCContract.cpp.
References llvm::objcarc::CanDecrementRefCount(), llvm::objcarc::GetArgRCIdentityRoot(), llvm::objcarc::GetBasicARCInstKind(), I, llvm::Release, llvm::objcarc::Retain, and Retain.
|
static |
Definition at line 206 of file ObjCARCContract.cpp.
References llvm::objcarc::CanUse(), llvm::dyn_cast(), E(), llvm::MemoryLocation::get(), llvm::objcarc::GetBasicARCInstKind(), I, llvm::isModSet(), llvm::objcarc::IsRetain(), and llvm::Release.
| INITIALIZE_PASS_BEGIN | ( | ObjCARCContractLegacyPass | , |
| "objc-arc-contract" | , | ||
| "ObjC ARC contraction" | , | ||
| false | , | ||
| false | ) |
References INITIALIZE_PASS_DEPENDENCY.
| STATISTIC | ( | NumPeeps | , |
| "Number of calls peephole-optimized" | ) |
| STATISTIC | ( | NumStoreStrongs | , |
| "Number objc_storeStrong calls formed" | ) |
Should we use objc_claimAutoreleasedReturnValue?
Definition at line 530 of file ObjCARCContract.cpp.
References llvm::cl::BOU_TRUE, llvm::cl::BOU_UNSET, llvm::Triple::BridgeOS, llvm::Triple::Darwin, llvm::Triple::IOS, llvm::Triple::MacOSX, llvm::Triple::TvOS, UseObjCClaimRV, and llvm::Triple::WatchOS.
| objc arc contract |
Definition at line 754 of file ObjCARCContract.cpp.
| objc arc ObjC ARC contraction |
Definition at line 755 of file ObjCARCContract.cpp.
| objc arc ObjC ARC false |
Definition at line 755 of file ObjCARCContract.cpp.
|
static |
Referenced by useClaimRuntimeCall().