[Mlir-commits] [mlir] [mlir][EmitC] Model lvalues as a type in EmitC (PR #91475)
Simon Camphausen
llvmlistbot at llvm.org
Mon Jun 17 05:53:56 PDT 2024
simon-camp wrote:
As this is a major breaking change, which possibly impacts many of the users of the EmitC dialect I would suggest to post a PSA on discourse and wait for a while before finally merging this PR. Suggestions welcome.
> PSA: Modelling memory of EmitC variables
>
> WIth [PR 91475](https://github.com/llvm/llvm-project/pull/91475) explicit variables will be modeled as lvalues in the type system. This introduces some breaking changes to multiple operations.
>
> - `emitc.variable` and `emitc.global` ops are restricted to return `emitc.array` or `emitc.lvalue` types
> - the result of the `emitc.variable` op can be materialized as SSA values with the `emitc.load` op
> - Taking the address of a value is restricted to operands with lvalue type
> - Conversion from lvalues into SSA values is done with the new `emitc.load` op
> - The var operand of the `emitc.assign` op is restricted to lvalue type
> - The result of the `emitc.subscript` and `emitc.get_global` ops is a lvalue type
> - results can be materialized as SSA values with the `emitc.load` op
https://github.com/llvm/llvm-project/pull/91475
More information about the Mlir-commits
mailing list