[all-commits] [llvm/llvm-project] bf47c1: [dataflow] Extract arena for Value/StorageLocation...

Sam McCall via All-commits all-commits at lists.llvm.org
Wed Apr 19 05:32:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf47c1ed855605324efcca4af92517026c7e53e5
      https://github.com/llvm/llvm-project/commit/bf47c1ed855605324efcca4af92517026c7e53e5
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2023-04-19 (Wed, 19 Apr 2023)

  Changed paths:
    A clang/include/clang/Analysis/FlowSensitive/Arena.h
    M clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
    M clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
    A clang/lib/Analysis/FlowSensitive/Arena.cpp
    M clang/lib/Analysis/FlowSensitive/CMakeLists.txt
    M clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
    M clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
    A clang/unittests/Analysis/FlowSensitive/ArenaTest.cpp
    M clang/unittests/Analysis/FlowSensitive/CMakeLists.txt
    M clang/unittests/Analysis/FlowSensitive/DataflowAnalysisContextTest.cpp

  Log Message:
  -----------
  [dataflow] Extract arena for Value/StorageLocation out of DataflowAnalysisContext

DataflowAnalysisContext has a few too many responsibilities, this narrows them.

It also allows the Arena to be shared with analysis steps, which need to create
Values, without exposing the whole DACtx API (flow conditions etc).
This means Environment no longer needs to proxy all these methods.
(For now it still does, because there are many callsites to update, and maybe
if we separate bool formulas from values we can avoid churning them twice)

In future, if we untangle the concepts of Values from boolean formulas/atoms,
Arena would also be responsible for creating formulas and managing atom IDs.

Differential Revision: https://reviews.llvm.org/D148554




More information about the All-commits mailing list