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

Gil Rapaport llvmlistbot at llvm.org
Wed Jul 31 02:33:28 PDT 2024


aniragil wrote:

> Unless we want to add a mode to `call_opaque` where no actual call is done, i think some separation is probably good. There isn't an easy way to disambiguate between the two uses based on the arguments only, as an empty list of arguments is reasonable for a function call.

We could use something like an 'instantiate_only' unit attribute to disambiguate, it's the no-call semantic stretch that makes me somewhat uncomfortable with raising this option. OTOH, the new op would probably replicate eventually the (quite complex) capabilities of `call_opaque`, as `call_opaque` could also benefit from the ability to use `decltype` and the new op could benefit from providing literal types. This could lead to two very similar and quite complex ops separated mostly by their name. So I guess the more general question would is can/should these ops share functionality or do we need to replicate? Unifying them into a single op is one way to do it, but there may be others.
@marbre, @simon-camp, @mgehre-amd what do you think?


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


More information about the Mlir-commits mailing list