LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::objcarc::BottomUpPtrState Struct Reference

#include "Transforms/ObjCARC/PtrState.h"

Inheritance diagram for llvm::objcarc::BottomUpPtrState:
Inheritance graph
[legend]
Collaboration diagram for llvm::objcarc::BottomUpPtrState:
Collaboration graph
[legend]

Public Member Functions

 BottomUpPtrState ()=default
 
bool InitBottomUp (ARCMDKindCache &Cache, Instruction *I)
 (Re-)Initialize this bottom up pointer returning true if we detected a pointer with nested releases. More...
 
bool MatchWithRetain ()
 Return true if this set of releases can be paired with a release. More...
 
void HandlePotentialUse (BasicBlock *BB, Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA, ARCInstKind Class)
 
bool HandlePotentialAlterRefCount (Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA, ARCInstKind Class)
 
- Public Member Functions inherited from llvm::objcarc::PtrState
bool IsKnownSafe () const
 
void SetKnownSafe (const bool NewValue)
 
bool IsTailCallRelease () const
 
void SetTailCallRelease (const bool NewValue)
 
bool IsTrackingImpreciseReleases () const
 
const MDNodeGetReleaseMetadata () 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 RRInfoGetRRInfo () const
 

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...
 

Detailed Description

Definition at line 169 of file PtrState.h.

Constructor & Destructor Documentation

◆ BottomUpPtrState()

llvm::objcarc::BottomUpPtrState::BottomUpPtrState ( )
default

Member Function Documentation

◆ HandlePotentialAlterRefCount()

bool BottomUpPtrState::HandlePotentialAlterRefCount ( Instruction Inst,
const Value Ptr,
ProvenanceAnalysis PA,
ARCInstKind  Class 
)

◆ HandlePotentialUse()

void BottomUpPtrState::HandlePotentialUse ( BasicBlock BB,
Instruction Inst,
const Value Ptr,
ProvenanceAnalysis PA,
ARCInstKind  Class 
)

◆ InitBottomUp()

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 177 of file PtrState.cpp.

References llvm::dbgs(), DEBUG, llvm::objcarc::ARCMDKindCache::get(), llvm::Instruction::getMetadata(), llvm::objcarc::ImpreciseRelease, llvm::objcarc::RRInfo::ReleaseMetadata, llvm::objcarc::S_MovableRelease, and llvm::objcarc::S_Release.

Referenced by CheckForCanReleaseCFGHazard().

◆ MatchWithRetain()

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 203 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().


The documentation for this struct was generated from the following files: