PSA: Modelling memory of EmitC variables

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.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
  • The operands and results of the emitc.member and emitc.member_of_ptr ops 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.

@aniragil @marbre @mgehre-amd

1 Like