================ @@ -524,14 +531,20 @@ template <typename Derived, typename LatticeType, Direction Dir> class DataflowAnalysis { public: using Lattice = LatticeType; - using Base = DataflowAnalysis<Derived, LatticeType, Dir>; + using Base = DataflowAnalysis<Derived, Lattice, Dir>; private: const CFG &Cfg; AnalysisDeclContext &AC; + /// The dataflow state before a basic block is processed. llvm::DenseMap<const CFGBlock *, Lattice> InStates; + /// The dataflow state after a basic block is processed. llvm::DenseMap<const CFGBlock *, Lattice> OutStates; + /// The dataflow state at a Program Point. + /// In a forward analysis, this is the state after the Fact at that point has + /// been applied, while in a backward analysis, it is the state before. + llvm::DenseMap<ProgramPoint, Lattice> PerPointStates; ---------------- Xazax-hun wrote:
Do you think all of the analyses need `PerPointStates`? E.g., what about the `ExpiredLoansAnalysis`? I wonder if we should have a boolean policy here. https://github.com/llvm/llvm-project/pull/149199 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits