[all-commits] [llvm/llvm-project] fe72b9: [mlir][dataflow] Deduplicate data-flow solver work...

Yoni Katzuv via All-commits all-commits at lists.llvm.org
Mon Sep 14 05:31:10 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe72b9678b037eaa71627a503dcc17288f9c3811
      https://github.com/llvm/llvm-project/commit/fe72b9678b037eaa71627a503dcc17288f9c3811
  Author: Yoni Katzuv <yoni.katzuv at quantum-machines.co>
  Date:   2026-09-14 (Mon, 14 Sep 2026)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlowFramework.h
    M mlir/lib/Analysis/DataFlowFramework.cpp
    M mlir/test/Analysis/DataFlow/test-staged-analyses.mlir
    M mlir/test/Analysis/test-foo-analysis.mlir
    M mlir/test/lib/Analysis/TestDataFlowFramework.cpp

  Log Message:
  -----------
  [mlir][dataflow] Deduplicate data-flow solver worklist items (#221983)

The solver enqueues a work item every time a state it depends on
changes, so the same item can appear in the worklist many times.
A duplicate work item is re-processed even though its inputs have not
changed since the previous processing. For example, a dense analysis can
visit a join point with N predecessors up to N times in a row.

To deduplicate the worklist, pending items are tracked using a
`DenseSet`, and an item that is already pending is not pushed again.
Items are removed from the set when dequeued, before being visited, so
an analysis can still re-enqueue the point it is currently visiting.

Since analyses already have to be monotone to reach a fixed point, this
change does not affect analysis results, only the number of visits until
convergence. The test `FooState` used XOR for the join operation, which
is not monotone; the join operation was switched to OR and dependent
tests were updated.

A test that counts how many times a join block with several predecessors
is visited was added to check the deduplication.



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