[PATCH] D77314: [mlir][LLVM] Finer-grained control for C interface emission

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 09:12:17 PDT 2020


ftynse requested changes to this revision.
ftynse added inline comments.
This revision now requires changes to proceed.


================
Comment at: mlir/include/mlir/IR/Function.h:96
+  //===--------------------------------------------------------------------===//
+  bool emitCInterface();
+  void setEmitCInterface();
----------------
I would not leak implementation details of std->llvm lowering into core IR. We can have a dialect attribute `llvm.emit_c_interface` attached to a FuncOp without having FuncOp know about it. Then the lowering can check for it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77314/new/

https://reviews.llvm.org/D77314





More information about the llvm-commits mailing list