[all-commits] [llvm/llvm-project] d07c90: [mlir] Refactor the forward dataflow propagation i...

River Riddle via All-commits all-commits at lists.llvm.org
Mon Apr 26 19:40:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d07c90e39550e6b708d9bd262697a4b92bae860a
      https://github.com/llvm/llvm-project/commit/d07c90e39550e6b708d9bd262697a4b92bae860a
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-04-26 (Mon, 26 Apr 2021)

  Changed paths:
    A mlir/docs/Tutorials/DataFlowAnalysis.md
    A mlir/include/mlir/Analysis/DataFlowAnalysis.h
    M mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/DataFlowAnalysis.cpp
    M mlir/lib/Transforms/SCCP.cpp

  Log Message:
  -----------
  [mlir] Refactor the forward dataflow propagation in SCCP into a generic framework

This revision takes the forward value propagation engine in SCCP and refactors it into a more generalized forward dataflow analysis framework. This framework allows for propagating information about values across the various control flow constructs in MLIR, and removes the need for users to reinvent the traversal (often not as completely). There are a few aspects of the traversal, that were conservative for SCCP, that should be relaxed to support the needs of different value analyses. To keep this revision simple, these conservative behaviors will be left in (Note that this won't produce an incorrect result, but may produce more conservative results than necessary in certain edge cases. e.g. region entry arguments for non-region branch interface operations). The framework also only focuses on computing lattices for values, given the SCCP origins, but this is something to relax as needed in the future.

Given that this logic is already in SCCP, a majority of this commit is NFC. The more interesting parts are the interface glue that clients interact with.

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




More information about the All-commits mailing list