[all-commits] [llvm/llvm-project] 15e915: [mlir][dataflow] Propagate errors from `visitOpera...

Ivan Butygin via All-commits all-commits at lists.llvm.org
Thu Aug 22 02:16:24 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 15e915a44f0d0bf092214586d3ec86e2bb7636d7
      https://github.com/llvm/llvm-project/commit/15e915a44f0d0bf092214586d3ec86e2bb7636d7
  Author: Ivan Butygin <ivan.butygin at gmail.com>
  Date:   2024-08-22 (Thu, 22 Aug 2024)

  Changed paths:
    M flang/lib/Optimizer/Transforms/StackArrays.cpp
    M mlir/include/mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/IntegerRangeAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/LivenessAnalysis.h
    M mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
    M mlir/lib/Analysis/DataFlow/ConstantPropagationAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/DenseAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/LivenessAnalysis.cpp
    M mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
    A mlir/test/Analysis/DataFlow/test-last-modified-error.mlir
    M mlir/test/lib/Analysis/DataFlow/TestDenseBackwardDataFlowAnalysis.cpp
    M mlir/test/lib/Analysis/DataFlow/TestDenseDataFlowAnalysis.h
    M mlir/test/lib/Analysis/DataFlow/TestDenseForwardDataFlowAnalysis.cpp
    M mlir/test/lib/Analysis/DataFlow/TestSparseBackwardDataFlowAnalysis.cpp

  Log Message:
  -----------
  [mlir][dataflow] Propagate errors from `visitOperation` (#105448)

Base `DataFlowAnalysis::visit` returns `LogicalResult`, but wrappers's
Sparse/Dense/Forward/Backward `visitOperation` doesn't.

Sometimes it's needed to abort solver early if some unrecoverable
condition detected inside analysis.

Update `visitOperation` to return `LogicalResult` and propagate it to
`solver.initializeAndRun()`. Only `visitOperation` is updated for now,
it's possible to update other hooks like `visitNonControlFlowArguments`,
bit it's not needed immediately and let's keep this PR small.

Hijacked `UnderlyingValueAnalysis` test analysis to test it.



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