[Mlir-commits] [mlir] [MLIR][Transform] Allow ApplyRegisteredPassOp to take options as a param (PR #142683)

Rolf Morel llvmlistbot at llvm.org
Wed Jun 4 09:54:36 PDT 2025


rolfmorel wrote:

Indeed, being able to mix-and-match static arguments with those passed in dynamically - or being able to combine multiple orthogonal dynamic arguments - would be nice! 

The suggested syntax of an `ArrayAttr` where elements are either strings, i.e. "option=value" pairs, or can be transform params makes sense to me. With the interpretation that these elements need be joined by commas to have a single `options` string to pass to the pass.

Switching to this syntax does break the (documented) property that the `options` argument is just the string one would pass to the pass on the commandline. On the other hand, as this string had to be statically provided anyway, you could always do the transformation to an array manually. We could keep this option available though: either the options argument is a StringAttr (maybe even coming in as a param) _or_ it is an array (of StringAttr or SSA-values) which will be comma-joined.

I will have a go at updating the PR. Thanks @fschlimb!


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


More information about the Mlir-commits mailing list