[Mlir-commits] [mlir] EmitC: Add emitc.global and emitc.get_global (#145) (PR #88701)

Simon Camphausen llvmlistbot at llvm.org
Fri Apr 19 02:53:05 PDT 2024


simon-camp wrote:

> What do you mean by `it wouldn't be possible to take the address of a const global`? I'd think you can call emitc.apply on the result of a `emitc.get_global` to get the address of that global, independent of whether it is const.

You are right, I thought we were verifying operand type and pointee type in the `apply &` op. We would need a way to represent `pointer to const int` for example, but let's postpone this discussion to a later point if/when need for this comes up.

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


More information about the Mlir-commits mailing list