[all-commits] [llvm/llvm-project] 2f8966: [mlir] An implementation of sparse data-flow analysis

Jeff Niu via All-commits all-commits at lists.llvm.org
Wed Jun 29 17:03:51 PDT 2022


  Branch: refs/heads/multi
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f8966f90f8e9942a47c39fcd1560048ab8a265e
      https://github.com/llvm/llvm-project/commit/2f8966f90f8e9942a47c39fcd1560048ab8a265e
  Author: Mogball <jeffniu22 at gmail.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/DeadCodeAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
    M mlir/lib/Analysis/DataFlow/ConstantPropagationAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
    M mlir/lib/Transforms/SCCP.cpp

  Log Message:
  -----------
  [mlir] An implementation of sparse data-flow analysis

This patch introduces a (forward) sparse data-flow analysis implemented with the data-flow analysis framework. The analysis interacts with liveness information that can be provided by dead-code analysis to be conditional. This patch re-implements SCCP using dead-code analysis and (conditional) constant propagation analyses.


  Commit: 4f3b2db56dcc4632e783824006a87adb67ff4d18
      https://github.com/llvm/llvm-project/commit/4f3b2db56dcc4632e783824006a87adb67ff4d18
  Author: Mogball <jeffniu22 at gmail.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h
    A mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
    M mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/DataFlow/DenseAnalysis.cpp
    A mlir/test/Analysis/DataFlow/test-last-modified-callgraph.mlir
    A mlir/test/Analysis/DataFlow/test-last-modified.mlir
    M mlir/test/lib/Analysis/CMakeLists.txt
    A mlir/test/lib/Analysis/DataFlow/TestDenseDataFlowAnalysis.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir] An implementation of dense data-flow analysis

This patch introduces an implementation of dense data-flow analysis. Dense
data-flow analysis attaches a lattice before and after the execution of every
operation. The lattice state is propagated across operations by a user-defined
transfer function. The state is joined across control-flow and callgraph edges.

Thge patch provides an example pass that uses both a dense and a sparse analysis
together.


  Commit: 20344c1bc9a4efc1cc163ed86cd267cd7ca0202e
      https://github.com/llvm/llvm-project/commit/20344c1bc9a4efc1cc163ed86cd267cd7ca0202e
  Author: Mogball <jeffniu22 at gmail.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    A mlir/include/mlir/Analysis/DataFlow/IntegerRangeAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
    M mlir/include/mlir/Analysis/DataFlowFramework.h
    R mlir/include/mlir/Analysis/IntRangeAnalysis.h
    M mlir/include/mlir/Interfaces/InferIntRangeInterface.td
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
    A mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
    M mlir/lib/Analysis/DataFlowFramework.cpp
    R mlir/lib/Analysis/IntRangeAnalysis.cpp
    M mlir/lib/Dialect/Arithmetic/Transforms/UnsignedWhenEquivalent.cpp
    M mlir/lib/Transforms/SCCP.cpp
    M mlir/test/lib/Analysis/DataFlow/TestDeadCodeAnalysis.cpp
    M mlir/test/lib/Transforms/TestIntRangeInference.cpp

  Log Message:
  -----------
  [mlir] Swap integer range inference to the new framework

Integer range inference has been swapped to the new framework. The integer value range lattices automatically updates the corresponding constant value on update.


  Commit: 98516983ab16197a43d3aac778367cc353cb44aa
      https://github.com/llvm/llvm-project/commit/98516983ab16197a43d3aac778367cc353cb44aa
  Author: Mogball <jeffniu22 at gmail.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlowAnalysis.h
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Analysis/DataFlowAnalysis.cpp
    M mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
    M mlir/lib/Dialect/Transform/Transforms/CheckUses.cpp
    R mlir/test/Analysis/test-data-flow.mlir
    M mlir/test/lib/Analysis/CMakeLists.txt
    R mlir/test/lib/Analysis/TestDataFlow.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir] Delete ForwardDataFlowAnalysis

With SCCP and integer range analysis ported to the new framework, this old framework is redundant. Delete it.


  Commit: 1ed1e8c7843248091019d5e902b73405567dc464
      https://github.com/llvm/llvm-project/commit/1ed1e8c7843248091019d5e902b73405567dc464
  Author: Mogball <jeffniu22 at gmail.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/DeadCodeAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/IntegerRangeAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
    M mlir/include/mlir/Analysis/DataFlowFramework.h
    M mlir/lib/Analysis/DataFlow/ConstantPropagationAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/DenseAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
    M mlir/lib/Analysis/DataFlowFramework.cpp
    M mlir/lib/Dialect/Arithmetic/Transforms/UnsignedWhenEquivalent.cpp
    M mlir/lib/Transforms/SCCP.cpp
    M mlir/test/lib/Analysis/DataFlow/TestDeadCodeAnalysis.cpp
    M mlir/test/lib/Analysis/DataFlow/TestDenseDataFlowAnalysis.cpp
    M mlir/test/lib/Analysis/TestDataFlowFramework.cpp
    M mlir/test/lib/Transforms/TestIntRangeInference.cpp

  Log Message:
  -----------
  overhaul state management and allow multi state elements


  Commit: 81b151bcb52b5d8a6f505c333e63dce386250a08
      https://github.com/llvm/llvm-project/commit/81b151bcb52b5d8a6f505c333e63dce386250a08
  Author: Mogball <jeffniu22 at gmail.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M mlir/test/lib/Analysis/TestDataFlowFramework.cpp

  Log Message:
  -----------
  test composition


Compare: https://github.com/llvm/llvm-project/compare/a2abbc2ec1b0...81b151bcb52b


More information about the All-commits mailing list