[all-commits] [llvm/llvm-project] 78b3a0: [mlir] `int-range-optmizations`: Fix referencing o...

Felix Schneider via All-commits all-commits at lists.llvm.org
Sun May 12 09:12:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 78b3a00418ce6da0426a261a64a77608d0264fe5
      https://github.com/llvm/llvm-project/commit/78b3a00418ce6da0426a261a64a77608d0264fe5
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-05-12 (Sun, 12 May 2024)

  Changed paths:
    M mlir/include/mlir/Analysis/DataFlowFramework.h
    M mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp

  Log Message:
  -----------
  [mlir] `int-range-optmizations`: Fix referencing of deleted ops (#91807)

The pass runs a `DataFlowSolver` and collects state information on the
input IR. Then, the rewrite driver and folding is applied. During
pattern application and folding it can happen that an Op from the input
IR is deleted and a new Op is created at the same address. When the
newly created Ops is looked up in the `DataFlowSolver` state memory, the
state of the original Op is returned.

This patch adds a method to `DataFlowSolver` which removes all state
related to a `ProgramPoint`. It also adds a listener to the Pass which
clears the state information of deleted Ops from the `DataFlowSolver`.

Fix https://github.com/llvm/llvm-project/issues/81228



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