Skip to content

[mlir][dxsa] Add control flow instructions#194

Merged
tagolog merged 1 commit into
dxsa-mlirfrom
vshiryaev/dxsa-mlir-control-flow-instructions
Jul 1, 2026
Merged

[mlir][dxsa] Add control flow instructions#194
tagolog merged 1 commit into
dxsa-mlirfrom
vshiryaev/dxsa-mlir-control-flow-instructions

Conversation

@tagolog

@tagolog tagolog commented Jun 21, 2026

Copy link
Copy Markdown
  • break
  • continue
  • default
  • else
  • endif
  • endloop
  • endswitch
  • loop
  • ret

Example:

  dxsa.break
  dxsa.continue
  dxsa.default
  dxsa.else
  dxsa.endif
  dxsa.endloop
  dxsa.endswitch
  dxsa.loop
  dxsa.ret

@tagolog tagolog requested review from asavonic, asl and hvdijk June 21, 2026 19:41
@tagolog tagolog self-assigned this Jun 21, 2026
@hvdijk

hvdijk commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

I suppose there is an open question here: do we want structured MLIR? If we do, we wouldn't model e.g. dxsa.endif as an instruction, we'd instead give dxsa.if a block and make the dxsa.endif implicit?

Comment thread mlir/lib/Target/DXSA/BinaryParser.cpp Outdated
@asl

asl commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

I suppose there is an open question here: do we want structured MLIR?

No. This is a bytecode dialect.

@tagolog tagolog force-pushed the vshiryaev/dxsa-mlir-control-flow-instructions branch from 1e72f2f to 0bdc78d Compare June 25, 2026 05:44
@tagolog tagolog requested a review from hvdijk June 25, 2026 05:46
Comment thread mlir/include/mlir/Dialect/DXSA/IR/DXSAOpBase.td Outdated

@asavonic asavonic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

 - break
 - continue
 - default
 - else
 - endif
 - endloop
 - endswitch
 - loop
 - ret

Example:
  dxsa.break
  dxsa.continue
  dxsa.default
  dxsa.else
  dxsa.endif
  dxsa.endloop
  dxsa.endswitch
  dxsa.loop
  dxsa.ret

Signed-off-by: Vladimir Shiryaev <vshiryaev@accesssoftek.com>
@tagolog tagolog force-pushed the vshiryaev/dxsa-mlir-control-flow-instructions branch from df05037 to b752897 Compare July 1, 2026 19:26
@tagolog tagolog merged commit 24e901d into dxsa-mlir Jul 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants