[flang-commits] [flang] [mlir] [mlir][IR] Rename "update root" to "modify op" in rewriter API (PR #78260)

Matthias Springer via flang-commits flang-commits at lists.llvm.org
Tue Jan 16 08:28:53 PST 2024


matthias-springer wrote:

I've been working on additional listener notifications for blocks: `notifyBlockRemoved` (#78306) and `notifyBlockModified`. The goal is to have as good support for blocks as we have for operations. A good example of this is `IRMapping`.

To trigger the latter notification, we would need a `RewriterBase::modifyBlockInPlace`. This API would used when adding arguments to an existing block, etc. (But not when adding/removing operations from a block, because we have dedicated notifications for that.)

Ideally, I'd have a single `RewriterBase::modifyInPlace` function (same for `start`, `finalize`, `cancel`) function that can take blocks or operations. (To be precise, two overloads, same as `IRMapping`.)

I'd like to avoid changing this API twice in a row, so I wanted to bring it up before merging this commit. Any thoughts? If it needs more discussion, I can also merge this commit now and post on Discourse.


https://github.com/llvm/llvm-project/pull/78260


More information about the flang-commits mailing list