Skip to content

Commit ae9dcbb

Browse files
[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.
1 parent baa249a commit ae9dcbb

File tree

1 file changed

+283
-183
lines changed

1 file changed

+283
-183
lines changed

0 commit comments

Comments
 (0)