[Mlir-commits] [mlir] [MLIR] emitc: Add emitc translation unit op (PR #123298)

Gil Rapaport llvmlistbot at llvm.org
Mon Jan 20 01:06:34 PST 2025


aniragil wrote:

Thinking about the semantics of the proposed op, such a file-scope `emitc` op may be useful beyond the functionality introduced by this patch, e.g. for

(a) Specifying the C dialect the `emitc` code belongs to, e.g. in order for the translator to know how to emit vector types when targeting OpenCL, GCC vector extensions etc.

(b) For offload/launch semantics such as in `gpu.launch_func`/`gpu.module`, which could prove useful for OpenCL, OpenMP etc.

(c) Validation: Utilizing standard op validation to verify that all its internal ops are `emitc` and potentially that these ops and types are valid in its designated C-dialect (e.g. vector types, address spaces, templates).

Would be good to discuss this op's designated uses to make sure we don't introduce backward compatibility later.
WDYT?

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


More information about the Mlir-commits mailing list