clang 22.0.0git
Public Member Functions | Public Attributes | List of all members
clang::lifetimes::internal::LoanPropagationLattice Struct Reference

Represents the dataflow lattice for loan propagation. More...

Public Member Functions

 LoanPropagationLattice (const OriginLoanMap &S)
 
 LoanPropagationLattice ()=default
 
bool operator== (const LoanPropagationLattice &Other) const
 
bool operator!= (const LoanPropagationLattice &Other) const
 
void dump (llvm::raw_ostream &OS) const
 

Public Attributes

OriginLoanMap Origins = OriginLoanMap(nullptr)
 The map from an origin to the set of loans it contains.
 

Detailed Description

Represents the dataflow lattice for loan propagation.

This lattice tracks which loans each origin may hold at a given program point.The lattice has a finite height: An origin's loan set is bounded by the total number of loans in the function. TODO(opt): To reduce the lattice size, propagate origins of declarations, not expressions, because expressions are not visible across blocks.

Definition at line 812 of file LifetimeSafety.cpp.

Constructor & Destructor Documentation

◆ LoanPropagationLattice() [1/2]

clang::lifetimes::internal::LoanPropagationLattice::LoanPropagationLattice ( const OriginLoanMap S)
inlineexplicit

Definition at line 816 of file LifetimeSafety.cpp.

◆ LoanPropagationLattice() [2/2]

clang::lifetimes::internal::LoanPropagationLattice::LoanPropagationLattice ( )
default

Member Function Documentation

◆ dump()

void clang::lifetimes::internal::LoanPropagationLattice::dump ( llvm::raw_ostream &  OS) const
inline

Definition at line 826 of file LifetimeSafety.cpp.

References Origins.

◆ operator!=()

bool clang::lifetimes::internal::LoanPropagationLattice::operator!= ( const LoanPropagationLattice Other) const
inline

Definition at line 822 of file LifetimeSafety.cpp.

References clang::Other.

◆ operator==()

bool clang::lifetimes::internal::LoanPropagationLattice::operator== ( const LoanPropagationLattice Other) const
inline

Definition at line 819 of file LifetimeSafety.cpp.

References Origins, and clang::Other.

Member Data Documentation

◆ Origins

OriginLoanMap clang::lifetimes::internal::LoanPropagationLattice::Origins = OriginLoanMap(nullptr)

The map from an origin to the set of loans it contains.

Definition at line 814 of file LifetimeSafety.cpp.

Referenced by dump(), clang::lifetimes::internal::LoanPropagationAnalysis::join(), and operator==().


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