[Mlir-commits] [mlir] [mlir][emitc] Add address-of and dereference ops (PR #72569)

Gil Rapaport llvmlistbot at llvm.org
Sun Nov 23 00:45:56 PST 2025


aniragil wrote:

> Looks good to me. But let's get confirmation from @marbre that his concerns are addressed.

Sure. @marbre, are we good to go on this PR?

Regarding the graceful retirement of `apply`: PR will be followed by a PSA in Discourse encouraging users to switch from the now-deprecated `apply` op to the new ops. For now it remains supported by the translator and form-expressions, but upstream conversion passes don't generate it anymore.

Per the discussion about regarding iree's `addressOf()` - IIUC the suggestion to create a temp variables for arguments and take their address was implemented, so `address_of` can replace `apply` there.

I agree with @simon-camp regarding function arguments being lvalues in C just like variables, so if we'd like to support taking their address in the future I think they should be switched to `lvalue<>` types (means arguments will need to be loaded just like variables, but we can do that transparently when lowering `func::func` to `emitc::func`)

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


More information about the Mlir-commits mailing list