[all-commits] [llvm/llvm-project] aaf5c8: [mlir][Transforms][NFC] Simplify `BlockTypeConvers...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Mon Mar 4 01:06:12 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aaf5c818b3b84a49f0c14879c141c7770f0fcf4b
https://github.com/llvm/llvm-project/commit/aaf5c818b3b84a49f0c14879c141c7770f0fcf4b
Author: Matthias Springer <me at m-sp.org>
Date: 2024-03-04 (Mon, 04 Mar 2024)
Changed paths:
M mlir/lib/Transforms/Utils/DialectConversion.cpp
Log Message:
-----------
[mlir][Transforms][NFC] Simplify `BlockTypeConversionRewrite` (#83286)
When a block signature is converted during dialect conversion, a
`BlockTypeConversionRewrite` object is stored in the stack of rewrites.
Such an object represents multiple steps:
- Splitting the old block, i.e., creating a new block and moving all
operations over.
- Rewriting block arguments.
- Erasing the old block.
We have dedicated `IRRewrite` objects that represent "creating a block",
"moving an op" and "erasing a block". This commit reuses those rewrite
objects, so that there is less work to do in
`BlockTypeConversionRewrite::rollback` and
`BlockTypeConversionRewrite::commit`/`cleanup`.
Note: This change is in preparation of adding listener support to the
dialect conversion. The less work is done in a `commit` function, the
fewer notifications will have to be sent.
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