Skip to content

[NFC] add explanation to register flags doc #91803

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions llvm/docs/MIRLangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -540,41 +540,55 @@ Register Flags
The table below shows all of the possible register flags along with the
corresponding internal ``llvm::RegState`` representation:

..
Keep this in sync with MachineInstrBuilder.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this appear in the generated output?

Copy link
Contributor Author

Choose a reason for hiding this comment

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


.. list-table::
:header-rows: 1

* - Flag
- Internal Value
- Meaning

* - ``implicit``
- ``RegState::Implicit``
- Not emitted register (e.g. carry, or temporary result).

* - ``implicit-def``
- ``RegState::ImplicitDefine``
- ``implicit`` and ``def``

* - ``def``
- ``RegState::Define``
- Register definition.

* - ``dead``
- ``RegState::Dead``
- Unused definition.

* - ``killed``
- ``RegState::Kill``
- The last use of a register.

* - ``undef``
- ``RegState::Undef``
- Value of the register doesn't matter.

* - ``internal``
- ``RegState::InternalRead``
- Register reads a value that is defined inside the same instruction or bundle.

* - ``early-clobber``
- ``RegState::EarlyClobber``
- Register definition happens before uses.
Copy link
Contributor

Choose a reason for hiding this comment

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

This one probably needs more elaboration


* - ``debug-use``
- ``RegState::Debug``
- Register 'use' is for debugging purpose.

* - ``renamable``
- ``RegState::Renamable``
- Register that may be renamed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also probably needs more explanation


.. _subregister-indices:

Expand Down
Loading