3 Tool to simplify rewriting .mlir files. There are a couple of build in rewrites
4 discussed below along with usage.
6 Note: This is still in very early stage. Its so early its less a tool than a
7 growing collection of useful functions: to use its best to do what's needed on
8 a brance by just hacking it (dialects registered, rewrites etc) to say help
9 ease a rename, upstream useful utility functions, point to ease others
10 migrating, and then bin eventually. Once there are actually useful parts it
11 should be refactored same as mlir-opt.
17 Rename per op given a substring to a target. The match and replace uses LLVM's
18 regex sub for the match and replace while the op-name is matched via regular
19 string comparison. E.g.,
22 mlir-rewrite input.mlir -o output.mlir --simple-rename \
23 --simple-rename-op-name="test.concat" --simple-rename-match="axis" \
24 --simple-rename-replace="bxis"
27 to replace `axis` substring in the text of the range corresponding to
28 `test.concat` ops with `bxis`.