Some dialects have semantics which is not well represented by common
common SSA structures with dominance constraints. This patch allows
operations to declare the 'kind' of their contained regions.
Currently, two kinds are allowed: "SSACFG" and "GRAPH""Graph". The only
difference between them at the moment is that SSACFG regions are
required to have dominance, while Graph regions are not required to
have dominance. The intention is that this Interface would be
generated by ODS for existing operations, although this has not yet
checked for dominancebeen implemented. Presumably, while GRAPH regions are not verified forif someone were interested in code
dominance. The intention is that this Interface would be generated bygeneration, we might also have a "CFG" dialect, which defines control
ODS for existing operationsflow, although this habut does not yet been implementedt require SSA.
The new behavior is mostly identical to the previous behavior, since
registered operations without a RegionKindInterface are assumed to
contain SSACFG regions. However, the behavior has changed for
unregistered operations. Previously, these were checked for
dominance, however the new behavior allows dominance violations, in
order to allow the processing of unregistered dialects with Graph
regions. One implication of this is that regions in unregistered
order to allow the processing of unregistered dialects with GRAPHoperations with more than one op are no longer CSE'd (since it
regionsrequires dominance info).
I've also updated some of the generic documentation to removereorganized the LangRef documentation to remove assertions
about "sequential execution", "SSA Values", and "Dominance". Instead,
assertions about "sequential execution", "SSA Values",the core IR is simply "ordered" (i.e. andtotally ordered) and consists of
"Dominance""Values". Instead, the core IR is simply "ordered" (i.e. totallyI've also clarified some things about how control flow
ordered) and consists of "Values". I've also clarified some thingspasses between blocks in an SSACFG region. Control Flow must enter a
about how control flow passes between blocks in an SSACFGregion at the entry block and follow terminator operation successors
region. Control Flow must enter a region at the entry block and followor be returned to the containing op. Graph regions do not define a
terminator operation successorsor be returned to thenotion of containing oprol flow.
see discussion here: