[all-commits] [llvm/llvm-project] 956717: [mlir][Transforms][NFC] Modularize block actions

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Feb 9 01:37:43 PST 2024


  Branch: refs/heads/users/matthias-springer/rewrite_action
  Home:   https://github.com/llvm/llvm-project
  Commit: 956717ee48940279edfbe84794d6f9575c14d075
      https://github.com/llvm/llvm-project/commit/956717ee48940279edfbe84794d6f9575c14d075
  Author: Matthias Springer <springerm at google.com>
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
    M mlir/lib/Transforms/Utils/DialectConversion.cpp

  Log Message:
  -----------
  [mlir][Transforms][NFC] Modularize block actions

Throughout the rewrite process, the dialect conversion maintains a list
of "block actions" that can be rolled back upon failure. This commit
encapsulates the existing block actions into separate classes, making it
easier to add additional actions in the future.

This commit also renames "block actions" to "rewrite actions". In a
subsequent commit, an "operation action" that allows rolling back
movements of single operations is added. This is to support
`moveOpBefore` in the dialect conversion.

Rewrite actions have two methods: `commit()` commits an action. It can
no longer be rolled back afterwards. `rollback()` undoes an action. It
can no longer be committed afterwards.




More information about the All-commits mailing list