[all-commits] [llvm/llvm-project] 5d8813: [mlir] allow dense dataflow to customize call and ...

ftynse via All-commits all-commits at lists.llvm.org
Fri Jul 21 02:16:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d8813dec69360fce897f063a4a65106ae8ea22b
      https://github.com/llvm/llvm-project/commit/5d8813dec69360fce897f063a4a65106ae8ea22b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2023-07-21 (Fri, 21 Jul 2023)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h
    M mlir/lib/Analysis/DataFlow/DenseAnalysis.cpp
    M mlir/test/Analysis/DataFlow/test-last-modified-callgraph.mlir
    M mlir/test/Analysis/DataFlow/test-last-modified.mlir
    M mlir/test/Analysis/DataFlow/test-next-access.mlir
    M mlir/test/lib/Analysis/DataFlow/TestDenseBackwardDataFlowAnalysis.cpp
    M mlir/test/lib/Analysis/DataFlow/TestDenseDataFlowAnalysis.cpp
    M mlir/test/lib/Dialect/Test/TestDialect.cpp
    M mlir/test/lib/Dialect/Test/TestOps.td

  Log Message:
  -----------
  [mlir] allow dense dataflow to customize call and region operations

Initial implementations of dense dataflow analyses feature special cases
for operations that have region- or call-based control flow by
leveraging the corresponding interfaces. This is not necessarily
sufficient as these operations may influence the dataflow state by
themselves as well we through the control flow. For example,
`linalg.generic` and similar operations have region-based control flow
and their proper memory effects, so any memory-related analyses such as
last-writer require processing `linalg.generic` directly instead of, or
in addition to, the region-based flow.

Provide hooks to customize the processing of operations with region-
cand call-based contol flow in forward and backward dense dataflow
analysis. These hooks are trigerred when control flow is transferred
between the "main" operation, i.e. the call or the region owner, and
another region. Such an apporach allows the analyses to update the
lattice before and/or after the regions. In the `linalg.generic`
example, the reads from memory are interpreted as happening before the
body region and the writes to memory are interpreted as happening after
the body region. Using these hooks in generic analysis may require
introducing additional interfaces, but for now assume that the specific
analysis have spceial cases for the (rare) operaitons with call- and
region-based control flow that need additional processing.

Reviewed By: Mogball, phisiart

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




More information about the All-commits mailing list