Hi everyone!
WIth PR 91475 explicit variables in the EmitC dialect will be modeled as lvalues in the type system. This introduces some breaking changes to multiple operations.
emitc.variableandemitc.globalops are restricted to returnemitc.arrayoremitc.lvaluetypes- the result of the
emitc.variableop can be materialized as SSA values with theemitc.loadop
- the result of the
- 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.loadop - The var operand of the
emitc.assignop is restricted to lvalue type - The result of the
emitc.subscriptandemitc.get_globalops is a lvalue type- results can be materialized as SSA values with the
emitc.loadop
- results can be materialized as SSA values with the
- The operands and results of the
emitc.memberandemitc.member_of_ptrops are restricted to lvalue types
The changes are expected to land in ~2 weeks. Please reach out if you have problems adapting to these changes.
See also this See also this discussion for more context.