[Mlir-commits] [mlir] mlir: add an operation to EmitC for function template instantiation (PR #100895)

Gil Rapaport llvmlistbot at llvm.org
Fri Aug 2 01:12:37 PDT 2024


aniragil wrote:

> I agree that the ops should be modeled the same, but I don't know if unifying these into one op is a good design. As I understand the result type should be something callable (i.e. function type to start with) if only instantiation is desired.

How about we go the other way around? We could separate the template instantiation part out of `call_opaque` into its own op and replace `call_opaque` ability to take attributes as arguments using `emitc.constant`s and `emitc.literal`s. IIUC, without these complex behaviors  `call_opaque` is a simple call op and can be made obsolete by adding @simon-camp's suggested `call_indirect` op which takes pointers and callable values as its callee and a `call_lib` op which takes a string as its callee.

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


More information about the Mlir-commits mailing list