[all-commits] [llvm/llvm-project] 01eedb: [mlir] Refactor SubElementInterface replace support
River Riddle via All-commits
all-commits at lists.llvm.org
Tue Jul 26 14:51:57 PDT 2022
Author: River Riddle <riddleriver at gmail.com>
Date: 2022-07-26 (Tue, 26 Jul 2022)
[mlir] Refactor SubElementInterface replace support
The current support was essentially the amount necessary
to support replacing SymbolRefAttrs, but suffers from various
deficiencies (both ergonomic and functional):
* Replace crashes if unsupported
This makes it really hard to use safely, given that you don't know
if you are going to crash or not when using it.
* Types aren't supported
This seems like a simple missed addition when the attribute replacement
support was originally added.
* The ergonomics are weird
It currently uses an index based replacement, which makes the implementations
This commit refactors support to be a bit more ergonomic, and also
adds support for types in the process. This was also a great oppurtunity
to greatly simplify how replacement is done in the symbol table.
Differential Revision: https://reviews.llvm.org/D130589
More information about the All-commits