I have a PDL rewrite pattern like the following:
module @patterns {
pdl.pattern : benefit(1) {
%TRANSPOSE_OP = pdl.operation "some_dialect.transpose" (%ARG0, %ARG1 : !pdl.value, !pdl.value) -> (%TRANSPOSE_TYPE : !pdl.type)
pdl.rewrite {
%custom_op = pdl.apply_native_rewrite "createCustomOp" (%TRANSPOSE_OP : !pdl.operation) : !pdl.operation
}
}
}
and the native rewriter:
static Operation *createCustomOp(PatternRewriter &rewriter, Operation *op) {
...
}
I wonder if there is an example or a way to change createCustomOp to accept a list of Operations (Range). How would the PDL rewrite pattern change? @pifon2a