[all-commits] [llvm/llvm-project] 3a439e: [mlir][dataflow] disallow outside use of propagate...

Hongren Zheng via All-commits all-commits at lists.llvm.org
Mon Jan 27 21:32:49 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a439e2caf0bb545ee451df1de5b02ea068140f7
      https://github.com/llvm/llvm-project/commit/3a439e2caf0bb545ee451df1de5b02ea068140f7
  Author: Hongren Zheng <i at zenithal.me>
  Date:   2025-01-28 (Tue, 28 Jan 2025)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlowFramework.h
    M mlir/lib/Analysis/DataFlowFramework.cpp

  Log Message:
  -----------
  [mlir][dataflow] disallow outside use of propagateIfChanged for DataFlowSolver (#120885)

Detailed writeup is in https://github.com/google/heir/issues/1153. See
also https://github.com/llvm/llvm-project/pull/120881. In short,
`propagateIfChanged` is used outside of the `DataFlowAnalysis` scope,
because it is public, but it does not propagate as expected as the
`DataFlowSolver` has stopped running.

To solve such misuse, `propagateIfChanged` should be made
protected/private.

For downstream users affected by this, to correctly propagate the
change, the Analysis should be re-run (check #120881) instead of just a
`propagateIfChanged`

The change to `IntegerRangeAnalysis` is just a expansion of the
`solver->propagateIfChanged`. The `Lattice` has already been updated by
the `join`. Propagation is done by `onUpdate`.

Cc @Mogball for review



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list