Skip to content

Commit 80f8ae3

Browse files
authored
[NFC] add explanation to register flags doc (#91803)
1 parent acd1007 commit 80f8ae3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

llvm/docs/MIRLangRef.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,41 +540,55 @@ Register Flags
540540
The table below shows all of the possible register flags along with the
541541
corresponding internal ``llvm::RegState`` representation:
542542

543+
..
544+
Keep this in sync with MachineInstrBuilder.h
545+
543546
.. list-table::
544547
:header-rows: 1
545548

546549
* - Flag
547550
- Internal Value
551+
- Meaning
548552

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

552557
* - ``implicit-def``
553558
- ``RegState::ImplicitDefine``
559+
- ``implicit`` and ``def``
554560

555561
* - ``def``
556562
- ``RegState::Define``
563+
- Register definition.
557564

558565
* - ``dead``
559566
- ``RegState::Dead``
567+
- Unused definition.
560568

561569
* - ``killed``
562570
- ``RegState::Kill``
571+
- The last use of a register.
563572

564573
* - ``undef``
565574
- ``RegState::Undef``
575+
- Value of the register doesn't matter.
566576

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

570581
* - ``early-clobber``
571582
- ``RegState::EarlyClobber``
583+
- Register definition happens before uses.
572584

573585
* - ``debug-use``
574586
- ``RegState::Debug``
587+
- Register 'use' is for debugging purpose.
575588

576589
* - ``renamable``
577590
- ``RegState::Renamable``
591+
- Register that may be renamed.
578592

579593
.. _subregister-indices:
580594

0 commit comments

Comments
 (0)