I have some changes landing soon that will make the anchor op of a textual pass pipeline explicit in various APIs so that the text form can be round-tripped properly. For example instead of:
Why “unfortunately”? Having to instead type out mlir-opt -pass-pipeline="builtin.module(func.func(canonicalize))" is terribly more verbose and inconvenient.
Is mlir-opt -<unrestricted op/func op pass> equivalent to mlir-opt -pass-pipeline="builtin.module(func.func(<unrestricted op/func op pass>))"?
-canonicalize is not the same as -pass-pipeline="builtin.module(func.func(canonicalize)). Generic passes have no implicit nesting, so you would be running canonicalize at the builtin.module level.
This was just a wink to Chris here, because I advocated (unsuccessfully) 3 years ago to only support the pipeline form (at the time it would have been -pass-pipeline="func(pass-name)" because func and module were builtin and module was implicit top-level).
But more seriously, because this:
The non textual pipeline is ambiguous and confusing. It embeds too much “magic” to know what’s happening from reading the command line, and it does not scale of compose so it only works for trivial cases: the drawback makes it so that this does not pull its weight IMO (but I was unsuccessful with this line 3 years ago, I don’t expect to be today!)