Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove labels from the builtin inst kind macro #4558

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Nov 19, 2024

This is stamping out the per-instruction structs, similar to what we do elsewhere. BuiltinInstKind::label then finishes shifting to InstKind::ir_name.

@jonmeow
Copy link
Contributor Author

jonmeow commented Nov 19, 2024

Depends on #4556

TypeId type_id; \
};
#include "toolchain/sem_ir/inst_kind.def"
// TODO: Annotate as a builtin.
Copy link
Contributor

Choose a reason for hiding this comment

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

After this refactoring is done, what does it mean for an instruction to be a builtin? I think the only special thing is that we eagerly create an instance of the instruction at the start of the file. I wonder if something like "predefined constant" would be a better name for this than "builtin".

Copy link
Contributor Author

@jonmeow jonmeow Nov 20, 2024

Choose a reason for hiding this comment

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

I was considering "singleton instruction", will bring up on #toolchain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants