LLVM
8.0.1
|
#include "Transforms/ObjCARC/PtrState.h"
Additional Inherited Members | |
Protected Member Functions inherited from llvm::objcarc::PtrState | |
PtrState () | |
Protected Attributes inherited from llvm::objcarc::PtrState | |
bool | KnownPositiveRefCount = false |
True if the reference count is known to be incremented. More... | |
bool | Partial = false |
True if we've seen an opportunity for partial RR elimination, such as pushing calls into a CFG triangle or into one side of a CFG diamond. More... | |
unsigned char | Seq: 8 |
The current position in the sequence. More... | |
RRInfo | RRI |
Unidirectional information about the current sequence. More... | |
Definition at line 169 of file PtrState.h.
|
default |
bool BottomUpPtrState::HandlePotentialAlterRefCount | ( | Instruction * | Inst, |
const Value * | Ptr, | ||
ProvenanceAnalysis & | PA, | ||
ARCInstKind | Class | ||
) |
Definition at line 229 of file PtrState.cpp.
References llvm::objcarc::CanAlterRefCount(), llvm::dbgs(), LLVM_DEBUG, 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.
Referenced by CheckForCanReleaseCFGHazard().
void BottomUpPtrState::HandlePotentialUse | ( | BasicBlock * | BB, |
Instruction * | Inst, | ||
const Value * | Ptr, | ||
ProvenanceAnalysis & | PA, | ||
ARCInstKind | Class | ||
) |
Definition at line 257 of file PtrState.cpp.
References assert(), llvm::objcarc::Call, llvm::objcarc::CanUse(), llvm::dbgs(), llvm::BasicBlock::end(), llvm::objcarc::GetBasicARCInstKind(), llvm::BasicBlock::getFirstInsertionPt(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::objcarc::getreturnRVOperand(), llvm::objcarc::IsUser(), LLVM_DEBUG, 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.
Referenced by CheckForCanReleaseCFGHazard().
bool BottomUpPtrState::InitBottomUp | ( | ARCMDKindCache & | Cache, |
Instruction * | I | ||
) |
(Re-)Initialize this bottom up pointer returning true if we detected a pointer with nested releases.
Definition at line 178 of file PtrState.cpp.
References llvm::dbgs(), llvm::objcarc::ARCMDKindCache::get(), llvm::Instruction::getMetadata(), llvm::objcarc::ImpreciseRelease, LLVM_DEBUG, llvm::objcarc::RRInfo::ReleaseMetadata, llvm::objcarc::S_MovableRelease, and llvm::objcarc::S_Release.
Referenced by CheckForCanReleaseCFGHazard().
bool BottomUpPtrState::MatchWithRetain | ( | ) |
Return true if this set of releases can be paired with a release.
Modifies state appropriately to reflect that the matching occurred if it is successful.
It is assumed that one has already checked that the RCIdentity of the retain and the RCIdentity of this ptr state are the same.
Definition at line 205 of file PtrState.cpp.
References LLVM_FALLTHROUGH, 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.
Referenced by CheckForCanReleaseCFGHazard().