[all-commits] [llvm/llvm-project] 2d3bbb: [mlir][Transforms] Dialect conversion: Erase mater...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Apr 22 00:12:23 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d3bbb6aafbc74ef6fc51286f09def0f0e35fe14
      https://github.com/llvm/llvm-project/commit/2d3bbb6aafbc74ef6fc51286f09def0f0e35fe14
  Author: Matthias Springer <me at m-sp.org>
  Date:   2025-04-22 (Tue, 22 Apr 2025)

  Changed paths:
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/Transforms/Utils/DialectConversion.cpp

  Log Message:
  -----------
  [mlir][Transforms] Dialect conversion: Erase materialized constants instead of rollback (#136489)

When illegal (and not legalizable) constant operations are materialized
during a dialect conversion as part of op folding, these operations must
be deleted again. This used to be implemented via the rollback
mechanism. This commit switches the implementation to regular rewriter
API usage: simply delete the materialized constants with `eraseOp`.

This commit is in preparation of the One-Shot Dialect Conversion
refactoring, which will disallow IR rollbacks.

This commit also adds a new optional parameter to `OpBuilder::tryFold`
to get hold of the materialized constant ops.



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