Parsing the following IntegerSet in MLIR:
#set = affine_set<(i0, i1) : ()>
gives the following error:
error: expected bare identifier
#set = affine_set<(i0, i1) : ()>
^
On further investigation, the i0
here is parsed as an inttype
instead of a bare-identifier
. This is contrary to what MLIR Langref claims:
MLIR guarantees identifiers never collide with keywords by prefixing identifiers with a sigil (e.g. %, #, @, ^, !). In certain unambiguous contexts (e.g. affine expressions), identifiers are not prefixed, for brevity. New keywords may be added to future versions of MLIR without danger of collision with existing identifiers.
Is this the intended behaviour of AffineMap/IntegerSet? If yes, could the error be updated to say usage of the reserved word is not allowed
and the Langref be updated to mention this? Otherwise, should this set be parsed?
I would be willing to send a patch to fix this based on what the correct behaviour should be (if needed).