|
LLVM
3.7.0
|
Namespaces | |
| llvm | |
| Compute iterated dominance frontiers using a linear time algorithm. | |
Functions | |
| STATISTIC (NumNoops,"Number of no-op objc calls eliminated") | |
| STATISTIC (NumPartialNoops,"Number of partially no-op objc calls eliminated") | |
| STATISTIC (NumAutoreleases,"Number of autoreleases converted to releases") | |
| STATISTIC (NumRets,"Number of return value forwarding ""retain+autoreleases eliminated") | |
| STATISTIC (NumRRs,"Number of retain+release paths eliminated") | |
| STATISTIC (NumPeeps,"Number of calls peephole-optimized") | |
| STATISTIC (NumRetainsBeforeOpt,"Number of retains before optimization") | |
| STATISTIC (NumReleasesBeforeOpt,"Number of releases before optimization") | |
| STATISTIC (NumRetainsAfterOpt,"Number of retains after optimization") | |
| STATISTIC (NumReleasesAfterOpt,"Number of releases after optimization") | |
| INITIALIZE_PASS_BEGIN (ObjCARCOpt,"objc-arc","ObjC ARC optimization", false, false) INITIALIZE_PASS_END(ObjCARCOpt | |
| static void | CheckForUseCFGHazard (const Sequence SuccSSeq, const bool SuccSRRIKnownSafe, TopDownPtrState &S, bool &SomeSuccHasSame, bool &AllSuccsHaveSame, bool &NotAllSeqEqualButKnownSafe, bool &ShouldContinue) |
| If we have a top down pointer in the S_Use state, make sure that there are no CFG hazards by checking the states of various bottom up pointers. More... | |
| static void | CheckForCanReleaseCFGHazard (const Sequence SuccSSeq, const bool SuccSRRIKnownSafe, TopDownPtrState &S, bool &SomeSuccHasSame, bool &AllSuccsHaveSame, bool &NotAllSeqEqualButKnownSafe) |
| If we have a Top Down pointer in the S_CanRelease state, make sure that there are no CFG hazards by checking the states of various bottom up pointers. More... | |
| static void | ComputePostOrders (Function &F, SmallVectorImpl< BasicBlock * > &PostOrder, SmallVectorImpl< BasicBlock * > &ReverseCFGPostOrder, unsigned NoObjCARCExceptionsMDKind, DenseMap< const BasicBlock *, BBState > &BBStates) |
| static bool | HasSafePathToPredecessorCall (const Value *Arg, Instruction *Retain, SmallPtrSetImpl< Instruction * > &DepInsts, SmallPtrSetImpl< const BasicBlock * > &Visited, ProvenanceAnalysis &PA) |
| Check if there is a dependent call earlier that does not have anything in between the Retain and the call that can affect the reference count of their shared pointer argument. More... | |
| static CallInst * | FindPredecessorRetainWithSafePath (const Value *Arg, BasicBlock *BB, Instruction *Autorelease, SmallPtrSetImpl< Instruction * > &DepInsts, SmallPtrSetImpl< const BasicBlock * > &Visited, ProvenanceAnalysis &PA) |
| Find a dependent retain that precedes the given autorelease for which there is nothing in between the two instructions that can affect the ref count of Arg. More... | |
| static CallInst * | FindPredecessorAutoreleaseWithSafePath (const Value *Arg, BasicBlock *BB, ReturnInst *Ret, SmallPtrSetImpl< Instruction * > &DepInsts, SmallPtrSetImpl< const BasicBlock * > &V, ProvenanceAnalysis &PA) |
| Look for an ``autorelease'' instruction dependent on Arg such that there are no instructions dependent on Arg that need a positive ref count in between the autorelease and the ret. More... | |
| raw_ostream & | llvm::operator<< (raw_ostream &OS, BBState &BBState) LLVM_ATTRIBUTE_UNUSED |
| Pass * | llvm::createObjCARCOptPass () |
Variables | |
| objc | arc |
| objc ObjC ARC | optimization |
| objc ObjC ARC | false |
| static char | ObjCARCOpt::ID = 0 |
|
static |
If we have a Top Down pointer in the S_CanRelease state, make sure that there are no CFG hazards by checking the states of various bottom up pointers.
Definition at line 973 of file ObjCARCOpts.cpp.
References llvm::objcarc::PtrState::IsKnownSafe(), llvm_unreachable, llvm::objcarc::S_CanRelease, llvm::objcarc::S_MovableRelease, llvm::objcarc::S_None, llvm::objcarc::S_Release, llvm::objcarc::S_Retain, llvm::objcarc::S_Stop, and llvm::objcarc::S_Use.
|
static |
If we have a top down pointer in the S_Use state, make sure that there are no CFG hazards by checking the states of various bottom up pointers.
Definition at line 935 of file ObjCARCOpts.cpp.
References llvm::objcarc::PtrState::ClearSequenceProgress(), llvm::objcarc::PtrState::IsKnownSafe(), llvm_unreachable, llvm::objcarc::S_CanRelease, llvm::objcarc::S_MovableRelease, llvm::objcarc::S_None, llvm::objcarc::S_Release, llvm::objcarc::S_Retain, llvm::objcarc::S_Stop, llvm::objcarc::S_Use, and llvm::objcarc::PtrState::SetCFGHazardAfflicted().
|
static |
The visited set, for doing DFS walks.
Definition at line 1361 of file ObjCARCOpts.cpp.
References llvm::SmallVectorTemplateCommon< T >::back(), llvm::BasicBlock::back(), llvm::Function::begin(), llvm::SmallPtrSetImplBase::clear(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::SmallVectorBase::empty(), llvm::Function::end(), llvm::SmallPtrSetImpl< PtrType >::erase(), llvm::Function::getEntryBlock(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::pred_begin(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Definition at line 563 of file ObjCARCOpts.cpp.
|
static |
Look for an ``autorelease'' instruction dependent on Arg such that there are no instructions dependent on Arg that need a positive ref count in between the autorelease and the ret.
Definition at line 2046 of file ObjCARCOpts.cpp.
References llvm::objcarc::Autorelease, llvm::SmallPtrSetImpl< PtrType >::begin(), llvm::objcarc::FindDependencies(), llvm::objcarc::GetArgRCIdentityRoot(), llvm::objcarc::GetBasicARCInstKind(), llvm::objcarc::IsAutorelease(), llvm::objcarc::NeedsPositiveRetainCount, and llvm::SmallPtrSetImplBase::size().
|
static |
Find a dependent retain that precedes the given autorelease for which there is nothing in between the two instructions that can affect the ref count of Arg.
Definition at line 2021 of file ObjCARCOpts.cpp.
References llvm::SmallPtrSetImpl< PtrType >::begin(), llvm::objcarc::CanChangeRetainCount, llvm::objcarc::FindDependencies(), llvm::objcarc::GetArgRCIdentityRoot(), llvm::objcarc::GetBasicARCInstKind(), llvm::objcarc::IsRetain(), and llvm::SmallPtrSetImplBase::size().
|
static |
Check if there is a dependent call earlier that does not have anything in between the Retain and the call that can affect the reference count of their shared pointer argument.
Note that Retain need not be in BB.
Definition at line 1994 of file ObjCARCOpts.cpp.
References llvm::objcarc::Call, llvm::objcarc::CallOrUser, llvm::objcarc::CanChangeRetainCount, llvm::objcarc::FindDependencies(), llvm::objcarc::GetBasicARCInstKind(), and llvm::Instruction::getParent().
| INITIALIZE_PASS_BEGIN | ( | ObjCARCOpt | , |
| "objc-arc" | , | ||
| "ObjC ARC optimization" | , | ||
| false | , | ||
| false | |||
| ) |
| raw_ostream & llvm::operator<< | ( | raw_ostream & | OS, |
| BBState & | BBState | ||
| ) |
Definition at line 420 of file ObjCARCOpts.cpp.
References llvm::dbgs(), DEBUG, llvm::objcarc::PtrState::GetSeq(), llvm::objcarc::PtrState::HasKnownPositiveRefCount(), I, llvm::objcarc::PtrState::IsCFGHazardAfflicted(), llvm::objcarc::PtrState::IsKnownSafe(), llvm::objcarc::PtrState::IsTrackingImpreciseReleases(), and P.
| STATISTIC | ( | NumNoops | , |
| "Number of no-op objc calls eliminated" | |||
| ) |
| STATISTIC | ( | NumPartialNoops | , |
| "Number of partially no-op objc calls eliminated" | |||
| ) |
| STATISTIC | ( | NumAutoreleases | , |
| "Number of autoreleases converted to releases" | |||
| ) |
| STATISTIC | ( | NumRets | , |
| "Number of return value forwarding ""retain+autoreleases eliminated" | |||
| ) |
| STATISTIC | ( | NumRRs | , |
| "Number of retain+release paths eliminated" | |||
| ) |
| STATISTIC | ( | NumPeeps | , |
| "Number of calls peephole-optimized" | |||
| ) |
| STATISTIC | ( | NumRetainsBeforeOpt | , |
| "Number of retains before optimization" | |||
| ) |
| STATISTIC | ( | NumReleasesBeforeOpt | , |
| "Number of releases before optimization" | |||
| ) |
| STATISTIC | ( | NumRetainsAfterOpt | , |
| "Number of retains after optimization" | |||
| ) |
| STATISTIC | ( | NumReleasesAfterOpt | , |
| "Number of releases after optimization" | |||
| ) |
| objc arc |
Definition at line 561 of file ObjCARCOpts.cpp.
| objc ObjC ARC false |
Definition at line 561 of file ObjCARCOpts.cpp.
|
static |
Definition at line 549 of file ObjCARCOpts.cpp.
| objc ObjC ARC optimization |
Definition at line 561 of file ObjCARCOpts.cpp.
1.8.6