Skip to content

Move the terminator to the end of BB#132

Merged
tancheng merged 1 commit intocoredac:mainfrom
ShangkunLi:fuse-redundant-ctrl
Sep 25, 2025
Merged

Move the terminator to the end of BB#132
tancheng merged 1 commit intocoredac:mainfrom
ShangkunLi:fuse-redundant-ctrl

Conversation

@ShangkunLi
Copy link
Copy Markdown
Collaborator

To fix the return problem, we should not remove the Terminator attribute of return ops. Because in a well-formed MLIR representation, each BB should terminate with a terminator.

So I keep this attribute and explicitly reorder the ops so that return ops will be put at the end of the flattened BB.

@ShangkunLi ShangkunLi marked this pull request as ready for review September 25, 2025 06:57
@ShangkunLi ShangkunLi self-assigned this Sep 25, 2025
@ShangkunLi ShangkunLi added the bug Something isn't working label Sep 25, 2025
@tancheng tancheng merged commit 940ce2c into coredac:main Sep 25, 2025
1 check passed
ShangkunLi pushed a commit that referenced this pull request Mar 12, 2026
Move the terminator to the end of BB
ShangkunLi pushed a commit that referenced this pull request Mar 12, 2026
Move the terminator to the end of BB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error: 'neura.return' op must be the last operation in the parent block

2 participants