LLVM 20.0.0git
|
This class summarizes several per-pointer runtime properties which are propagated through the flow graph. More...
#include "Transforms/ObjCARC/PtrState.h"
Public Member Functions | |
bool | IsKnownSafe () const |
void | SetKnownSafe (const bool NewValue) |
bool | IsTailCallRelease () const |
void | SetTailCallRelease (const bool NewValue) |
bool | IsTrackingImpreciseReleases () const |
const MDNode * | GetReleaseMetadata () const |
void | SetReleaseMetadata (MDNode *NewValue) |
bool | IsCFGHazardAfflicted () const |
void | SetCFGHazardAfflicted (const bool NewValue) |
void | SetKnownPositiveRefCount () |
void | ClearKnownPositiveRefCount () |
bool | HasKnownPositiveRefCount () const |
void | SetSeq (Sequence NewSeq) |
Sequence | GetSeq () const |
void | ClearSequenceProgress () |
void | ResetSequenceProgress (Sequence NewSeq) |
void | Merge (const PtrState &Other, bool TopDown) |
void | InsertCall (Instruction *I) |
void | InsertReverseInsertPt (Instruction *I) |
void | ClearReverseInsertPts () |
bool | HasReverseInsertPts () const |
const RRInfo & | GetRRInfo () const |
Protected Member Functions | |
PtrState () | |
Protected Attributes | |
bool | KnownPositiveRefCount = false |
True if the reference count is known to be incremented. | |
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. | |
unsigned char | Seq: 8 |
The current position in the sequence. | |
RRInfo | RRI |
Unidirectional information about the current sequence. | |
This class summarizes several per-pointer runtime properties which are propagated through the flow graph.
Definition at line 101 of file PtrState.h.
|
inlineprotected |
Definition at line 116 of file PtrState.h.
void PtrState::ClearKnownPositiveRefCount | ( | ) |
Definition at line 129 of file PtrState.cpp.
References llvm::dbgs(), KnownPositiveRefCount, and LLVM_DEBUG.
Referenced by llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), and llvm::objcarc::TopDownPtrState::MatchWithRelease().
|
inline |
Definition at line 161 of file PtrState.h.
References llvm::objcarc::RRInfo::ReverseInsertPts, and RRI.
Referenced by llvm::objcarc::TopDownPtrState::MatchWithRelease(), and llvm::objcarc::BottomUpPtrState::MatchWithRetain().
|
inline |
Definition at line 152 of file PtrState.h.
References ResetSequenceProgress(), and llvm::objcarc::S_None.
Referenced by CheckForUseCFGHazard(), and Merge().
Definition at line 133 of file PtrState.h.
References llvm::objcarc::RRInfo::ReleaseMetadata, and RRI.
Definition at line 165 of file PtrState.h.
References RRI.
|
inline |
Definition at line 150 of file PtrState.h.
References Seq.
Referenced by llvm::objcarc::BottomUpPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), llvm::objcarc::TopDownPtrState::HandlePotentialUse(), llvm::objcarc::BottomUpPtrState::InitBottomUp(), llvm::objcarc::TopDownPtrState::InitTopDown(), llvm::objcarc::TopDownPtrState::MatchWithRelease(), llvm::objcarc::BottomUpPtrState::MatchWithRetain(), Merge(), and SetSeq().
|
inline |
Definition at line 146 of file PtrState.h.
References KnownPositiveRefCount.
Referenced by llvm::objcarc::BottomUpPtrState::InitBottomUp(), and llvm::objcarc::TopDownPtrState::InitTopDown().
|
inline |
Definition at line 163 of file PtrState.h.
References llvm::objcarc::RRInfo::ReverseInsertPts, and RRI.
Referenced by llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), and llvm::objcarc::BottomUpPtrState::HandlePotentialUse().
|
inline |
Definition at line 157 of file PtrState.h.
References llvm::objcarc::RRInfo::Calls, I, and RRI.
Referenced by llvm::objcarc::BottomUpPtrState::InitBottomUp(), and llvm::objcarc::TopDownPtrState::InitTopDown().
|
inline |
Definition at line 159 of file PtrState.h.
References I, llvm::objcarc::RRInfo::ReverseInsertPts, and RRI.
Referenced by llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), and llvm::objcarc::BottomUpPtrState::InitBottomUp().
|
inline |
Definition at line 137 of file PtrState.h.
References llvm::objcarc::RRInfo::CFGHazardAfflicted, and RRI.
|
inline |
Definition at line 119 of file PtrState.h.
References llvm::objcarc::RRInfo::KnownSafe, and RRI.
Referenced by CheckForCanReleaseCFGHazard(), and CheckForUseCFGHazard().
|
inline |
Definition at line 123 of file PtrState.h.
References llvm::objcarc::RRInfo::IsTailCallRelease, and RRI.
|
inline |
Definition at line 129 of file PtrState.h.
References llvm::objcarc::RRInfo::ReleaseMetadata, and RRI.
Referenced by llvm::objcarc::BottomUpPtrState::MatchWithRetain().
Definition at line 147 of file PtrState.cpp.
References llvm::objcarc::RRInfo::clear(), ClearSequenceProgress(), GetSeq(), KnownPositiveRefCount, llvm::objcarc::RRInfo::Merge(), MergeSeqs(), llvm::Other, Partial, RRI, llvm::objcarc::S_None, and Seq.
void PtrState::ResetSequenceProgress | ( | Sequence | NewSeq | ) |
Definition at line 140 of file PtrState.cpp.
References llvm::objcarc::RRInfo::clear(), llvm::dbgs(), LLVM_DEBUG, Partial, RRI, and SetSeq().
Referenced by ClearSequenceProgress(), llvm::objcarc::BottomUpPtrState::InitBottomUp(), and llvm::objcarc::TopDownPtrState::InitTopDown().
Definition at line 139 of file PtrState.h.
References llvm::objcarc::RRInfo::CFGHazardAfflicted, and RRI.
Referenced by CheckForUseCFGHazard(), llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), and llvm::objcarc::BottomUpPtrState::HandlePotentialUse().
void PtrState::SetKnownPositiveRefCount | ( | ) |
Definition at line 124 of file PtrState.cpp.
References llvm::dbgs(), KnownPositiveRefCount, and LLVM_DEBUG.
Referenced by llvm::objcarc::BottomUpPtrState::InitBottomUp(), llvm::objcarc::TopDownPtrState::InitTopDown(), and llvm::objcarc::BottomUpPtrState::MatchWithRetain().
Definition at line 121 of file PtrState.h.
References llvm::objcarc::RRInfo::KnownSafe, and RRI.
Referenced by llvm::objcarc::BottomUpPtrState::InitBottomUp(), and llvm::objcarc::TopDownPtrState::InitTopDown().
|
inline |
Definition at line 135 of file PtrState.h.
References llvm::objcarc::RRInfo::ReleaseMetadata, and RRI.
Referenced by llvm::objcarc::BottomUpPtrState::InitBottomUp(), and llvm::objcarc::TopDownPtrState::MatchWithRelease().
void PtrState::SetSeq | ( | Sequence | NewSeq | ) |
Definition at line 134 of file PtrState.cpp.
References llvm::dbgs(), GetSeq(), LLVM_DEBUG, and Seq.
Referenced by llvm::objcarc::BottomUpPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::TopDownPtrState::HandlePotentialAlterRefCount(), llvm::objcarc::BottomUpPtrState::HandlePotentialUse(), llvm::objcarc::TopDownPtrState::HandlePotentialUse(), and ResetSequenceProgress().
Definition at line 125 of file PtrState.h.
References llvm::objcarc::RRInfo::IsTailCallRelease, and RRI.
Referenced by llvm::objcarc::BottomUpPtrState::InitBottomUp(), and llvm::objcarc::TopDownPtrState::MatchWithRelease().
|
protected |
True if the reference count is known to be incremented.
Definition at line 104 of file PtrState.h.
Referenced by ClearKnownPositiveRefCount(), HasKnownPositiveRefCount(), Merge(), and SetKnownPositiveRefCount().
|
protected |
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.
Definition at line 108 of file PtrState.h.
Referenced by Merge(), and ResetSequenceProgress().
|
protected |
Unidirectional information about the current sequence.
Definition at line 114 of file PtrState.h.
Referenced by ClearReverseInsertPts(), GetReleaseMetadata(), GetRRInfo(), HasReverseInsertPts(), InsertCall(), InsertReverseInsertPt(), IsCFGHazardAfflicted(), IsKnownSafe(), IsTailCallRelease(), IsTrackingImpreciseReleases(), Merge(), ResetSequenceProgress(), SetCFGHazardAfflicted(), SetKnownSafe(), SetReleaseMetadata(), and SetTailCallRelease().
The current position in the sequence.
Definition at line 111 of file PtrState.h.