[all-commits] [llvm/llvm-project] 8faefe: [mlir][Transforms][NFC] Modularize block actions (...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Wed Feb 14 08:15:42 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8faefe36ed57c2dab2b50e76fd27045b908f8c1d
https://github.com/llvm/llvm-project/commit/8faefe36ed57c2dab2b50e76fd27045b908f8c1d
Author: Matthias Springer <me at m-sp.org>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M mlir/lib/Transforms/Utils/DialectConversion.cpp
Log Message:
-----------
[mlir][Transforms][NFC] Modularize block actions (#81237)
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 "IR rewrites". In a
subsequent commit, an "operation rewrite" class that allows rolling back
movements of single operations is added. This is to support
`moveOpBefore` in the dialect conversion.
Rewrites have two methods: `commit()` commits an action. It can no
longer be rolled back afterwards. `rollback()` undoes a rewrite. It can
no longer be committed afterwards.
More information about the All-commits
mailing list