LLVM 20.0.0git
|
Classes | |
class | ARCMDKindCache |
A cache of MDKinds used by various ARC optimizations. More... | |
class | ARCRuntimeEntryPoints |
Declarations for ObjC runtime functions and constants. More... | |
struct | BottomUpPtrState |
class | BundledRetainClaimRVs |
class | ObjCARCAA |
Analysis pass providing a never-invalidated alias analysis result. More... | |
class | ObjCARCAAResult |
This is a simple alias analysis implementation that uses knowledge of ARC constructs to answer queries. More... | |
class | ProvenanceAnalysis |
This is similar to BasicAliasAnalysis, and it uses many of the same techniques, except it uses special ObjC-specific reasoning about pointer relationships. More... | |
class | PtrState |
This class summarizes several per-pointer runtime properties which are propagated through the flow graph. More... | |
struct | RRInfo |
Unidirectional information about either a retain-decrement-use-release sequence or release-use-decrement-retain reverse sequence. More... | |
struct | TopDownPtrState |
Functions | |
bool | ModuleHasARC (const Module &M) |
Test if the given module looks interesting to run ARC optimization on. | |
const Value * | 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. | |
const Value * | GetUnderlyingObjCPtrCached (const Value *V, DenseMap< const Value *, std::pair< WeakVH, WeakTrackingVH > > &Cache) |
A wrapper for GetUnderlyingObjCPtr used for results memoization. | |
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 equivalent to retaining or releasing V. | |
Value * | GetRCIdentityRoot (Value *V) |
Helper which calls const Value *GetRCIdentityRoot(const Value *V) and just casts away the const of the result. | |
Value * | 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. | |
bool | IsNullOrUndef (const Value *V) |
bool | IsNoopInstruction (const Instruction *I) |
bool | IsPotentialRetainableObjPtr (const Value *Op) |
Test whether the given value is possible a retainable object pointer. | |
bool | IsPotentialRetainableObjPtr (const Value *Op, AAResults &AA) |
ARCInstKind | GetCallSiteClass (const CallBase &CB) |
Helper for GetARCInstKind. | |
bool | IsObjCIdentifiedObject (const Value *V) |
Return true if this value refers to a distinct and identifiable object. | |
raw_ostream & | operator<< (raw_ostream &OS, const ARCInstKind Class) |
bool | IsUser (ARCInstKind Class) |
Test if the given class is a kind of user. | |
bool | IsRetain (ARCInstKind Class) |
Test if the given class is objc_retain or equivalent. | |
bool | IsAutorelease (ARCInstKind Class) |
Test if the given class is objc_autorelease or equivalent. | |
bool | IsForwarding (ARCInstKind Class) |
Test if the given class represents instructions which return their argument verbatim. | |
bool | IsNoopOnNull (ARCInstKind Class) |
Test if the given class represents instructions which do nothing if passed a null pointer. | |
bool | IsNoopOnGlobal (ARCInstKind Class) |
Test if the given class represents instructions which do nothing if passed a global variable. | |
bool | IsAlwaysTail (ARCInstKind Class) |
Test if the given class represents instructions which are always safe to mark with the "tail" keyword. | |
bool | IsNeverTail (ARCInstKind Class) |
Test if the given class represents instructions which are never safe to mark with the "tail" keyword. | |
bool | IsNoThrow (ARCInstKind Class) |
Test if the given class represents instructions which are always safe to mark with the nounwind attribute. | |
bool | CanInterruptRV (ARCInstKind Class) |
Test whether the given instruction can autorelease any pointer or cause an autoreleasepool pop. | |
ARCInstKind | GetFunctionClass (const Function *F) |
Determine if F is one of the special known Functions. | |
ARCInstKind | GetBasicARCInstKind (const Value *V) |
Determine which objc runtime call instruction class V belongs to. | |
ARCInstKind | GetARCInstKind (const Value *V) |
Map V to its ARCInstKind equivalence class. | |
bool | CanDecrementRefCount (ARCInstKind Kind) |
Returns false if conservatively we can prove that any instruction mapped to this kind can not decrement ref counts. | |
const char * | getRVMarkerModuleFlagStr () |
bool | hasAttachedCallOpBundle (const CallBase *CB) |
std::optional< Function * > | getAttachedARCFunction (const CallBase *CB) |
This function returns operand bundle clang_arc_attachedcall's argument, which is the address of the ARC runtime function. | |
bool | isRetainOrClaimRV (ARCInstKind Kind) |
Check whether the function is retainRV/unsafeClaimRV. | |
ARCInstKind | getAttachedARCFunctionKind (const CallBase *CB) |
This function returns the ARCInstKind of the function attached to operand bundle clang_arc_attachedcall. | |
llvm::Instruction * | findSingleDependency (DependenceKind Flavor, const Value *Arg, BasicBlock *StartBB, Instruction *StartInst, ProvenanceAnalysis &PA) |
Find dependent instructions. | |
bool | Depends (DependenceKind Flavor, Instruction *Inst, const Value *Arg, ProvenanceAnalysis &PA) |
Test if there can be dependencies on Inst through Arg. | |
bool | CanUse (const Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA, ARCInstKind Class) |
Test whether the given instruction can "use" the given pointer's object in a way that requires the reference count to be positive. | |
bool | CanAlterRefCount (const Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA, ARCInstKind Class) |
Test whether the given instruction can result in a reference count modification (positive or negative) for the pointer's object. | |
bool | CanDecrementRefCount (const Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA, ARCInstKind Class) |
Returns true if we can not conservatively prove that Inst can not decrement the reference count of Ptr. | |
static bool | CanDecrementRefCount (const Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA) |
static void | EraseInstruction (Instruction *CI) |
Erase the given instruction. | |
static const Instruction * | getreturnRVOperand (const Instruction &Inst, ARCInstKind Class) |
If Inst is a ReturnRV and its operand is a call or invoke, return the operand. | |
template<class PHINodeTy , class VectorTy > | |
void | getEquivalentPHIs (PHINodeTy &PN, VectorTy &PHIList) |
Return the list of PHI nodes that are equivalent to PN. | |
static MDString * | getRVInstMarker (Module &M) |
CallInst * | createCallInstWithColors (FunctionCallee Func, ArrayRef< Value * > Args, const Twine &NameStr, BasicBlock::iterator InsertBefore, const DenseMap< BasicBlock *, ColorVector > &BlockColors) |
Create a call instruction with the correct funclet token. | |
raw_ostream & | operator<< (raw_ostream &OS, const Sequence S) LLVM_ATTRIBUTE_UNUSED |
Variables | |
bool | EnableARCOpts |
A handy option to enable/disable all ARC Optimizations. | |
|
strong |
Equivalence classes of instructions in the ARC Model.
Since we do not have "instructions" to represent ARC concepts in LLVM IR, we instead operate on equivalence classes of instructions.
TODO: This should be split into two enums: a runtime entry point enum (possibly united with the ARCRuntimeEntrypoint class) and an enum that deals with effects of instructions in the ARC model (which would handle the notion of a User or CallOrUser).
Definition at line 28 of file ObjCARCInstKind.h.
|
strong |
Enumerator | |
---|---|
ImpreciseRelease | |
CopyOnEscape | |
NoObjCARCExceptions |
Definition at line 221 of file ObjCARCAnalysisUtils.h.
|
strong |
Enumerator | |
---|---|
AutoreleaseRV | |
Release | |
Retain | |
RetainBlock | |
Autorelease | |
StoreStrong | |
RetainRV | |
UnsafeClaimRV | |
RetainAutorelease | |
RetainAutoreleaseRV |
Definition at line 37 of file ARCRuntimeEntryPoints.h.
Defines different dependence kinds among various ARC constructs.
There are several kinds of dependence-like concepts in use here.
Enumerator | |
---|---|
NeedsPositiveRetainCount | |
AutoreleasePoolBoundary | |
CanChangeRetainCount | |
RetainAutoreleaseDep | Blocks objc_retainAutorelease. |
RetainAutoreleaseRVDep | Blocks objc_retainAutoreleaseReturnValue. |
Definition at line 43 of file DependencyAnalysis.h.
A sequence of states that a pointer may go through in which an objc_retain and objc_release are actually needed.
Definition at line 41 of file PtrState.h.
bool llvm::objcarc::CanAlterRefCount | ( | const Instruction * | Inst, |
const Value * | Ptr, | ||
ProvenanceAnalysis & | PA, | ||
ARCInstKind | Class | ||
) |
Test whether the given instruction can result in a reference count modification (positive or negative) for the pointer's object.
Definition at line 35 of file DependencyAnalysis.cpp.
References Call, llvm::objcarc::ProvenanceAnalysis::getAA(), llvm::AAResults::getMemoryEffects(), IsPotentialRetainableObjPtr(), llvm::MemoryEffectsBase< LocationEnum >::onlyAccessesArgPointees(), llvm::MemoryEffectsBase< LocationEnum >::onlyReadsMemory(), Ptr, and llvm::objcarc::ProvenanceAnalysis::related().
Referenced by CanDecrementRefCount(), and Depends().
bool llvm::objcarc::CanDecrementRefCount | ( | ARCInstKind | Kind | ) |
Returns false if conservatively we can prove that any instruction mapped to this kind can not decrement ref counts.
Returns true otherwise.
Definition at line 667 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by CanDecrementRefCount(), findRetainForStoreStrongContraction(), llvm::objcarc::BottomUpPtrState::HandlePotentialAlterRefCount(), and llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount().
|
inlinestatic |
Definition at line 77 of file DependencyAnalysis.h.
References CanDecrementRefCount(), GetARCInstKind(), and Ptr.
bool llvm::objcarc::CanDecrementRefCount | ( | const Instruction * | Inst, |
const Value * | Ptr, | ||
ProvenanceAnalysis & | PA, | ||
ARCInstKind | Class | ||
) |
Returns true if we can not conservatively prove that Inst can not decrement the reference count of Ptr.
Returns false if we can.
Definition at line 66 of file DependencyAnalysis.cpp.
References CanAlterRefCount(), CanDecrementRefCount(), and Ptr.
bool llvm::objcarc::CanInterruptRV | ( | ARCInstKind | Class | ) |
Test whether the given instruction can autorelease any pointer or cause an autoreleasepool pop.
This means that it could interrupt the RV optimization.
Definition at line 634 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by Depends().
bool llvm::objcarc::CanUse | ( | const Instruction * | Inst, |
const Value * | Ptr, | ||
ProvenanceAnalysis & | PA, | ||
ARCInstKind | Class | ||
) |
Test whether the given instruction can "use" the given pointer's object in a way that requires the reference count to be positive.
Definition at line 80 of file DependencyAnalysis.cpp.
References llvm::objcarc::ProvenanceAnalysis::getAA(), GetUnderlyingObjCPtr(), IsPotentialRetainableObjPtr(), llvm::User::operands(), Ptr, and llvm::objcarc::ProvenanceAnalysis::related().
Referenced by Depends(), findSafeStoreForStoreStrongContraction(), llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), and llvm::objcarc::TopDownPtrState::HandlePotentialUse().
CallInst * llvm::objcarc::createCallInstWithColors | ( | FunctionCallee | Func, |
ArrayRef< Value * > | Args, | ||
const Twine & | NameStr, | ||
BasicBlock::iterator | InsertBefore, | ||
const DenseMap< BasicBlock *, ColorVector > & | BlockColors | ||
) |
Create a call instruction with the correct funclet token.
This should be called instead of calling CallInst::Create directly unless the call is going to be removed from the IR before WinEHPrepare.
Definition at line 24 of file ObjCARC.cpp.
References assert(), llvm::CallInst::Create(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::TinyPtrVector< EltTy >::front(), llvm::Instruction::isEHPad(), and llvm::TinyPtrVector< EltTy >::size().
Referenced by llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors().
bool llvm::objcarc::Depends | ( | DependenceKind | Flavor, |
Instruction * | Inst, | ||
const Value * | Arg, | ||
ProvenanceAnalysis & | PA | ||
) |
Test if there can be dependencies on Inst through Arg.
This function only tests dependencies relevant for removing pairs of calls.
Definition at line 122 of file DependencyAnalysis.cpp.
References AutoreleasePoolBoundary, CanAlterRefCount(), CanChangeRetainCount, CanInterruptRV(), CanUse(), GetARCInstKind(), GetArgRCIdentityRoot(), GetBasicARCInstKind(), llvm_unreachable, NeedsPositiveRetainCount, RetainAutoreleaseDep, and RetainAutoreleaseRVDep.
Referenced by findDependencies().
|
inlinestatic |
Erase the given instruction.
Many ObjC calls return their argument verbatim, so if it's such a call and the return value has users, replace them with the argument value.
Definition at line 39 of file ObjCARC.h.
References assert(), llvm::Instruction::eraseFromParent(), GetBasicARCInstKind(), IsForwarding(), IsNoopOnNull(), IsNullOrUndef(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::Value::replaceAllUsesWith(), llvm::Value::stripPointerCasts(), and llvm::Value::use_empty().
Referenced by llvm::objcarc::BundledRetainClaimRVs::eraseInst(), and llvm::objcarc::BundledRetainClaimRVs::~BundledRetainClaimRVs().
llvm::Instruction * llvm::objcarc::findSingleDependency | ( | DependenceKind | Flavor, |
const Value * | Arg, | ||
BasicBlock * | StartBB, | ||
Instruction * | StartInst, | ||
ProvenanceAnalysis & | PA | ||
) |
Find dependent instructions.
If there is exactly one dependent instruction, return it. Otherwise, return null.
Definition at line 255 of file DependencyAnalysis.cpp.
References llvm::SmallPtrSetImpl< PtrType >::begin(), findDependencies(), and llvm::SmallPtrSetImplBase::size().
Referenced by FindPredecessorAutoreleaseWithSafePath(), FindPredecessorRetainWithSafePath(), and HasSafePathToPredecessorCall().
ARCInstKind llvm::objcarc::GetARCInstKind | ( | const Value * | V | ) |
Map V to its ARCInstKind equivalence class.
Determine what kind of construct V is.
Definition at line 213 of file ObjCARCInstKind.cpp.
References F, llvm::CallBase::getCalledFunction(), GetCallSiteClass(), GetFunctionClass(), I, isInertIntrinsic(), IsPotentialRetainableObjPtr(), and isUseOnlyIntrinsic().
Referenced by CanDecrementRefCount(), and Depends().
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.
Definition at line 131 of file ObjCARCAnalysisUtils.h.
References GetRCIdentityRoot().
Referenced by Depends(), FindPredecessorAutoreleaseWithSafePath(), FindPredecessorRetainWithSafePath(), and findRetainForStoreStrongContraction().
This function returns operand bundle clang_arc_attachedcall's argument, which is the address of the ARC runtime function.
Definition at line 43 of file ObjCARCUtil.h.
References B, llvm::CallBase::getOperandBundle(), and llvm::LLVMContext::OB_clang_arc_attachedcall.
Referenced by getAttachedARCFunctionKind(), inlineRetainOrClaimRVCalls(), llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(), and llvm::AArch64CallLowering::lowerCall().
|
inline |
This function returns the ARCInstKind of the function attached to operand bundle clang_arc_attachedcall.
It returns std::nullopt if the call doesn't have the operand bundle or the operand is null. Otherwise it returns either RetainRV or UnsafeClaimRV.
Definition at line 60 of file ObjCARCUtil.h.
References assert(), getAttachedARCFunction(), GetFunctionClass(), isRetainOrClaimRV(), and None.
Referenced by llvm::InlineFunction(), and lowerObjCCall().
|
inline |
Determine which objc runtime call instruction class V belongs to.
This is similar to GetARCInstKind except that it only detects objc runtime calls. This allows it to be faster.
Definition at line 104 of file ObjCARCInstKind.h.
References CallOrUser, F, GetFunctionClass(), and User.
Referenced by Depends(), EraseInstruction(), FindPredecessorAutoreleaseWithSafePath(), FindPredecessorRetainWithSafePath(), findRetainForStoreStrongContraction(), findSafeStoreForStoreStrongContraction(), FindSingleUseIdentifiedObject(), llvm::objcarc::ObjCARCAAResult::getModRefInfo(), GetRCIdentityRoot(), GetUnderlyingObjCPtr(), llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), and HasSafePathToPredecessorCall().
|
inline |
Helper for GetARCInstKind.
Determines what kind of construct CS is.
Definition at line 173 of file ObjCARCAnalysisUtils.h.
References llvm::CallBase::args(), Call, CallOrUser, IsPotentialRetainableObjPtr(), None, llvm::CallBase::onlyReadsMemory(), and User.
Referenced by GetARCInstKind().
void llvm::objcarc::getEquivalentPHIs | ( | PHINodeTy & | PN, |
VectorTy & | PHIList | ||
) |
ARCInstKind llvm::objcarc::GetFunctionClass | ( | const Function * | F | ) |
Determine if F is one of the special known Functions.
If it isn't, return ARCInstKind::CallOrUser.
Definition at line 85 of file ObjCARCInstKind.cpp.
References F.
Referenced by GetARCInstKind(), getAttachedARCFunctionKind(), GetBasicARCInstKind(), llvm::objcarc::ObjCARCAAResult::getMemoryEffects(), and getOverridingTailCallKind().
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.
In other words, ARC operations on V
are equivalent to ARC operations on U
.
We use this in the ARC optimizer to make it easier to match up ARC operations by always mapping ARC operations to RCIdentityRoots instead of pointers themselves.
The two ways that we see RCIdentical values in ObjC are via:
Thus this function strips off pointer casts and forwarding calls. NOTE This implies that two RCIdentical values must alias.
Definition at line 110 of file ObjCARCAnalysisUtils.h.
References GetBasicARCInstKind(), and IsForwarding().
Referenced by llvm::objcarc::ObjCARCAAResult::alias(), collectReleaseInsertPts(), FindSingleUseIdentifiedObject(), GetArgRCIdentityRoot(), llvm::objcarc::ObjCARCAAResult::getModRefInfoMask(), GetRCIdentityRoot(), inlineRetainOrClaimRVCalls(), and IsObjCIdentifiedObject().
Helper which calls const Value *GetRCIdentityRoot(const Value *V) and just casts away the const of the result.
For documentation about what an RCIdentityRoot (and by extension GetRCIdentityRoot is) look at that function.
Definition at line 124 of file ObjCARCAnalysisUtils.h.
References GetRCIdentityRoot().
|
inlinestatic |
If Inst is a ReturnRV and its operand is a call or invoke, return the operand.
Otherwise return null.
Definition at line 61 of file ObjCARC.h.
References llvm::CallingConv::C, llvm::User::getOperand(), RetainRV, and llvm::Value::stripPointerCasts().
Referenced by llvm::objcarc::BottomUpPtrState::HandlePotentialUse().
Definition at line 92 of file ObjCARC.h.
References getRVMarkerModuleFlagStr().
Definition at line 25 of file ObjCARCUtil.h.
Referenced by getRVInstMarker().
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.
Definition at line 69 of file ObjCARCAnalysisUtils.h.
References GetBasicARCInstKind(), llvm::getUnderlyingObject(), and IsForwarding().
Referenced by llvm::objcarc::ObjCARCAAResult::alias(), CanUse(), llvm::objcarc::ObjCARCAAResult::getModRefInfoMask(), and GetUnderlyingObjCPtrCached().
|
inline |
A wrapper for GetUnderlyingObjCPtr used for results memoization.
Definition at line 81 of file ObjCARCAnalysisUtils.h.
References GetUnderlyingObjCPtr().
Referenced by llvm::objcarc::ProvenanceAnalysis::related().
Definition at line 29 of file ObjCARCUtil.h.
References llvm::CallBase::getFunctionType(), llvm::CallBase::getOperandBundle(), llvm::FunctionType::getReturnType(), llvm::Type::isVoidTy(), and llvm::LLVMContext::OB_clang_arc_attachedcall.
Referenced by llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), inlineRetainOrClaimRVCalls(), llvm::objcarc::BundledRetainClaimRVs::insertAfterInvokes(), and llvm::AArch64CallLowering::lowerCall().
bool llvm::objcarc::IsAlwaysTail | ( | ARCInstKind | Class | ) |
Test if the given class represents instructions which are always safe to mark with the "tail" keyword.
Definition at line 520 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by getOverridingTailCallKind().
bool llvm::objcarc::IsAutorelease | ( | ARCInstKind | Class | ) |
Test if the given class is objc_autorelease or equivalent.
Definition at line 380 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by FindPredecessorAutoreleaseWithSafePath().
bool llvm::objcarc::IsForwarding | ( | ARCInstKind | Class | ) |
Test if the given class represents instructions which return their argument verbatim.
Definition at line 415 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by EraseInstruction(), FindSingleUseIdentifiedObject(), GetRCIdentityRoot(), and GetUnderlyingObjCPtr().
bool llvm::objcarc::IsNeverTail | ( | ARCInstKind | Class | ) |
Test if the given class represents instructions which are never safe to mark with the "tail" keyword.
It is never safe to tail call objc_autorelease since by tail calling objc_autorelease: fast autoreleasing causing our object to be potentially reclaimed from the autorelease pool which violates the semantics of __autoreleasing types in ARC.
Definition at line 556 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by getOverridingTailCallKind().
|
inline |
Definition at line 139 of file ObjCARCAnalysisUtils.h.
References I.
bool llvm::objcarc::IsNoopOnGlobal | ( | ARCInstKind | Class | ) |
Test if the given class represents instructions which do nothing if passed a global variable.
Definition at line 485 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
bool llvm::objcarc::IsNoopOnNull | ( | ARCInstKind | Class | ) |
Test if the given class represents instructions which do nothing if passed a null pointer.
Definition at line 450 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by EraseInstruction().
bool llvm::objcarc::IsNoThrow | ( | ARCInstKind | Class | ) |
Test if the given class represents instructions which are always safe to mark with the nounwind attribute.
Definition at line 595 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Definition at line 135 of file ObjCARCAnalysisUtils.h.
Referenced by EraseInstruction(), and isInertARCValue().
Return true if this value refers to a distinct and identifiable object.
This is similar to AliasAnalysis's isIdentifiedObject, except that it uses special knowledge of ObjC conventions.
Definition at line 186 of file ObjCARCAnalysisUtils.h.
References GetRCIdentityRoot(), and Name.
Referenced by FindSingleUseIdentifiedObject().
Test whether the given value is possible a retainable object pointer.
Definition at line 146 of file ObjCARCAnalysisUtils.h.
Referenced by CanAlterRefCount(), CanUse(), GetARCInstKind(), GetCallSiteClass(), and IsPotentialRetainableObjPtr().
Definition at line 28 of file ObjCARCAnalysisUtils.cpp.
References IsPotentialRetainableObjPtr(), and llvm::AAResults::pointsToConstantMemory().
bool llvm::objcarc::IsRetain | ( | ARCInstKind | Class | ) |
Test if the given class is objc_retain or equivalent.
Definition at line 344 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Referenced by FindPredecessorRetainWithSafePath(), and findSafeStoreForStoreStrongContraction().
|
inline |
Check whether the function is retainRV/unsafeClaimRV.
Definition at line 52 of file ObjCARCUtil.h.
References RetainRV, and UnsafeClaimRV.
Referenced by getAttachedARCFunctionKind(), and inlineRetainOrClaimRVCalls().
bool llvm::objcarc::IsUser | ( | ARCInstKind | Class | ) |
Test if the given class is a kind of user.
Definition at line 310 of file ObjCARCInstKind.cpp.
References llvm_unreachable.
Test if the given module looks interesting to run ARC optimization on.
Definition at line 43 of file ObjCARCAnalysisUtils.h.
raw_ostream & llvm::objcarc::operator<< | ( | raw_ostream & | OS, |
const ARCInstKind | Class | ||
) |
Definition at line 28 of file ObjCARCInstKind.cpp.
References llvm_unreachable, and OS.
raw_ostream & llvm::objcarc::operator<< | ( | raw_ostream & | OS, |
const Sequence | S | ||
) |
Definition at line 37 of file PtrState.cpp.
References llvm_unreachable, OS, S_CanRelease, S_MovableRelease, S_None, S_Retain, S_Stop, and S_Use.
|
extern |
A handy option to enable/disable all ARC Optimizations.
Definition at line 23 of file ObjCARCAnalysisUtils.cpp.
Referenced by llvm::objcarc::ObjCARCAAResult::alias(), llvm::objcarc::ObjCARCAAResult::getMemoryEffects(), llvm::objcarc::ObjCARCAAResult::getModRefInfo(), and llvm::objcarc::ObjCARCAAResult::getModRefInfoMask().