[Mlir-commits] [mlir] [mlir][emitc] Refactor emitc.apply op (PR #72569)
Marius Brehler
llvmlistbot at llvm.org
Fri Nov 17 01:48:07 PST 2023
https://github.com/marbre commented:
This breaks the use of EmitC in IREE without providing a suitable alternative. **Therefore, this cannot be merged as-is!**
In IREE an address-of operator is applied to the arguments passed to a function (see [ConvertVMToEmitC.cpp#L2155](https://github.com/openxla/iree/blob/7963ca781b6f3782ad21d20ac24b7adca150e36f/compiler/src/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp#L2155)) and the &-operator is also used in conjunction with IREE's `!vm.ref` type.
Furthermore, I don't see a strong argument so far to split up the `emitc.apply` op. In the initial proposal, presented at the ODM at 2021-04-22 (EmitC: Generating C/C++ from MLIR [slides](https://drive.google.com/file/d/1p2AM7B1beb5oVf_tlTyinnVQoWuodoxl/view?usp=sharing)), we had an `emitc.getaddressof` op, but it was later on agreed to rather go with the `emitc.apply` op.
>From my point of view it is much more important to answer the question, whether it should be ensured in the conversion that the &-operator is not used incorrectly or if an incorrect usage could be prevented with a verification pass instead of coupling the &-operator to only EmitC variables.
https://github.com/llvm/llvm-project/pull/72569
More information about the Mlir-commits
mailing list