[Mlir-commits] [mlir] [mlir][emitc] Add a `declare_func` operation (PR #80297)

Marius Brehler llvmlistbot at llvm.org
Fri Feb 2 03:02:40 PST 2024


================
@@ -0,0 +1,16 @@
+// RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s
+
+// CHECK: int32_t bar(int32_t [[V1:[^ ]*]]);
+emitc.declare_func @bar
+// CHECK: int32_t bar(int32_t [[V1:[^ ]*]]) {
+emitc.func @bar(%arg0: i32) -> i32 {
----------------
marbre wrote:

So far most of our test "just" test the "core" functionality, whereas transporting the usefulness is left to the description. I agree that this would make a more meaningful example and we should provide examples somewhere. However, till now I was not sure if should use the tests for this. With this thoughts in mind, WDYT?

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


More information about the Mlir-commits mailing list