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

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 09:12:21 PDT 2020


mehdi_amini added inline comments.


================
Comment at: mlir/include/mlir/IR/Function.h:96
+  //===--------------------------------------------------------------------===//
+  bool emitCInterface();
+  void setEmitCInterface();
----------------
ftynse wrote:
> 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.
+1: seems like a layering violation right now.


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