clang 22.0.0git
|
A generic, policy-based driver for dataflow analyses. More...
Public Types | |
using | Lattice = LatticeType |
using | Base = DataflowAnalysis< Derived, Lattice, Dir > |
Public Member Functions | |
void | run () |
Lattice | transfer (Lattice In, const IssueFact &) |
Lattice | transfer (Lattice In, const ExpireFact &) |
Lattice | transfer (Lattice In, const AssignOriginFact &) |
Lattice | transfer (Lattice In, const ReturnOfOriginFact &) |
Lattice | transfer (Lattice In, const UseFact &) |
Lattice | transfer (Lattice In, const TestPointFact &) |
Protected Member Functions | |
DataflowAnalysis (const CFG &C, AnalysisDeclContext &AC, FactManager &F) | |
Lattice | getState (ProgramPoint P) const |
Lattice | getInState (const CFGBlock *B) const |
Lattice | getOutState (const CFGBlock *B) const |
void | dump () const |
Protected Attributes | |
FactManager & | AllFacts |
A generic, policy-based driver for dataflow analyses.
It combines the dataflow runner and the transferer logic into a single class hierarchy.
The derived class is expected to provide:
Lattice
type.StringRef getAnalysisName() const
Lattice getInitialState();
The initial state of the analysis.Lattice join(Lattice, Lattice);
Merges states from multiple CFG paths.Lattice transfer(Lattice, const FactType&);
Defines how a single lifetime-relevant Fact
transforms the lattice state. Only overloads for facts relevant to the analysis need to be implemented.Derived | The CRTP derived class that implements the specific analysis. |
LatticeType | The dataflow lattice used by the analysis. |
Dir | The direction of the analysis (Forward or Backward). TODO: Maybe use the dataflow framework! The framework might need changes to support the current comparison done at block-entry. |
Definition at line 608 of file LifetimeSafety.cpp.
using clang::lifetimes::internal::DataflowAnalysis< Derived, LatticeType, Dir >::Base = DataflowAnalysis<Derived, Lattice, Dir> |
Definition at line 611 of file LifetimeSafety.cpp.
using clang::lifetimes::internal::DataflowAnalysis< Derived, LatticeType, Dir >::Lattice = LatticeType |
Definition at line 610 of file LifetimeSafety.cpp.
|
inlineexplicitprotected |
Definition at line 631 of file LifetimeSafety.cpp.
|
inlineprotected |
Definition at line 679 of file LifetimeSafety.cpp.
References D, clang::CFG::getEntry(), clang::CFG::getExit(), and clang::lifetimes::internal::DataflowAnalysis< Derived, LatticeType, Dir >::getOutState().
|
inlineprotected |
Definition at line 675 of file LifetimeSafety.cpp.
Referenced by clang::lifetimes::internal::DataflowAnalysis< Derived, LatticeType, Dir >::run().
|
inlineprotected |
Definition at line 677 of file LifetimeSafety.cpp.
Referenced by clang::lifetimes::internal::DataflowAnalysis< Derived, LatticeType, Dir >::dump().
|
inlineprotected |
Definition at line 673 of file LifetimeSafety.cpp.
References P.
|
inline |
Definition at line 636 of file LifetimeSafety.cpp.
References D, clang::lifetimes::internal::Forward, clang::CFG::getEntry(), clang::CFG::getExit(), clang::lifetimes::internal::DataflowAnalysis< Derived, LatticeType, Dir >::getInState(), clang::CFG::getNumBlockIDs(), and Visited.
|
inline |
Definition at line 731 of file LifetimeSafety.cpp.
|
inline |
Definition at line 730 of file LifetimeSafety.cpp.
|
inline |
Definition at line 729 of file LifetimeSafety.cpp.
|
inline |
Definition at line 732 of file LifetimeSafety.cpp.
|
inline |
Definition at line 734 of file LifetimeSafety.cpp.
|
inline |
Definition at line 733 of file LifetimeSafety.cpp.
|
protected |
Definition at line 629 of file LifetimeSafety.cpp.