This PR is the next step towards goto support and adds flattening for ScopeOp and LoopOpInterface.
Looks like I can't separate this operations and create two PRs, since some errors occur if I do so, e.g. reference to block defined in another region. Seems we need to flatten both operations in the same time. Given it's a copy-pasta, I think there is no need to try to make several PRs.
I added several tests - just copied them from the lowering part just to demonstrate how it looks like.
Note, that changes in dot.cir caused by BrCondOp updates in the previous PR, when we removed the following casts:
%20 = llvm.zext %19 : i1 to i8
%21 = llvm.trunc %20 : i8 to i1
llvm.cond_br %21 ...
This PR is the next step towards goto support and adds flattening for
ScopeOp
andLoopOpInterface
.Looks like I can't separate this operations and create two PRs, since some errors occur if I do so, e.g.
reference to block defined in another region
. Seems we need to flatten both operations in the same time. Given it's a copy-pasta, I think there is no need to try to make several PRs.I added several tests - just copied them from the lowering part just to demonstrate how it looks like.
Note, that changes in
dot.cir
caused byBrCondOp
updates in the previous PR, when we removed the following casts: