[Mlir-commits] [mlir] [mlir][EmitC] Add support for external functions (PR #80547)

Marius Brehler llvmlistbot at llvm.org
Mon Feb 5 02:50:40 PST 2024


marbre wrote:

> edit: We need to override isDeclaration for the `emitc.func` op, similar to the one for the [func dialect](https://github.com/llvm/llvm-project/blob/95403b42da0de500f4f86add7a60b0daf8ec98d0/mlir/include/mlir/Dialect/Func/IR/FuncOps.td#L332). The default implementation always returns false.

No need to if we rely on `isExternal()`. As this change is primarily to handle external functions but not declarations in general (that's what we have `declare_func` in future for), I would rather tend to not override `isDeclaration()` or at least not rely on it. So yeah, we can override but I would rather use `isExternal()` in the emitter anyway.

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


More information about the Mlir-commits mailing list