[Mlir-commits] [mlir] mlir: add an operation to EmitC for function template instantiation (PR #100895)
Marius Brehler
llvmlistbot at llvm.org
Tue Aug 6 02:27:14 PDT 2024
marbre wrote:
> So is the consensus here to
>
> 1. add function types / function pointers
> 2. add a `call_indirect` op that accepts a value of a function type
> 3. add a `call_lib` op that accepts a string as the callee (I'm not sure how this differs much from the current `call_opaque`)
> 4. add a `instantiate_template` op that has a similar set of arguments as the current `call_opaque` that returns a value of a function type. `instantiate_template` would accept a string as the callee
> 5. deprecate `call_opaque`
>
> I could embark on this, but I want to make sure that everyone is on board before starting any of the work.
Sorry for not following up earlier. Isn't `call_lib` essentially the same as `call_opaque` with the lack of support for template arguments? In that case I think I would choose a different name instead of `call_lib` or even just keep the current name `call_opaque`. The disadvantage is that it is not as clear that the behavior will change as it would be with having a differently named op, but I favor this over introducing ops with not that clear names.
Generally speaking, yes we try to keep the dialect as stable as possible and therefore do not make us the decision to change it easy. With other words we try to avoid breaking changes. However, if evolvement is strictly required and we reached consensus we can go forward also with breaking changes.
https://github.com/llvm/llvm-project/pull/100895
More information about the Mlir-commits
mailing list