Skip to content

chore: optimize panic msg#21

Merged
MaxXSoft merged 1 commit into
pku-minic:masterfrom
hsqStephenZhang:chore/error_msg
Mar 4, 2026
Merged

chore: optimize panic msg#21
MaxXSoft merged 1 commit into
pku-minic:masterfrom
hsqStephenZhang:chore/error_msg

Conversation

@hsqStephenZhang
Copy link
Copy Markdown
Contributor

what does this PR do?

  1. Optimize error msg in IR builder
  2. Fix a bug in BasicBlockBuilder::call where the length of params and args are not checked.

@semisemisea
Copy link
Copy Markdown

I think when panic as "invalid basic block name: {}", you can also show the rules like this: "basic block name should start with '%' or '@' and not only the single '%' or '@' symbol". I think this warning message appears when you give wrong name to a value. You can reuse that sentence.
And the other modification lgtm.

@hsqStephenZhang
Copy link
Copy Markdown
Contributor Author

Fair enough. It's updated.

I think when panic as "invalid basic block name: {}", you can also show the rules like this: "basic block name should start with '%' or '@' and not only the single '%' or '@' symbol". I think this warning message appears when you give wrong name to a value. You can reuse that sentence. And the other modification lgtm.

Comment thread koopa/src/ir/builder.rs Outdated
Comment thread koopa/src/ir/builder.rs Outdated
@MaxXSoft
Copy link
Copy Markdown
Member

MaxXSoft commented Mar 4, 2026

LGTM. Thank you!

@MaxXSoft MaxXSoft merged commit 054bfe0 into pku-minic:master Mar 4, 2026
1 check 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.

3 participants