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

Update instructions for adding a SemIR instruction. #4348

Merged
merged 16 commits into from
Oct 10, 2024
5 changes: 5 additions & 0 deletions toolchain/docs/adding_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ updated. The updates needed, can depend on whether the instruction produces a
type. Look to the comments on those functions for instructions on what is
needed.

If the instruction owns references other instructions, add a case to
`InstNamer::CollectNamesInBlock` in
[`sem_ir/inst_namer.cpp`](/toolchain/sem_ir/inst_namer.cpp) to visit those other
instructions.

Adding an instruction will generally also require a handler in the Lower step.

Most new instructions will automatically be formatted reasonably by the SemIR
Expand Down
Loading