[llvm] 80f8ae3 - [NFC] add explanation to register flags doc (#91803)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 11:34:31 PDT 2024


Author: Florian Mayer
Date: 2024-05-14T11:34:27-07:00
New Revision: 80f8ae3f8485b62529c32683ca48822d700c7716

URL: https://github.com/llvm/llvm-project/commit/80f8ae3f8485b62529c32683ca48822d700c7716
DIFF: https://github.com/llvm/llvm-project/commit/80f8ae3f8485b62529c32683ca48822d700c7716.diff

LOG: [NFC] add explanation to register flags doc (#91803)

Added: 
    

Modified: 
    llvm/docs/MIRLangRef.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/MIRLangRef.rst b/llvm/docs/MIRLangRef.rst
index e248a14636a86..ec29870128c1d 100644
--- a/llvm/docs/MIRLangRef.rst
+++ b/llvm/docs/MIRLangRef.rst
@@ -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
+
 .. 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.
 
    * - ``debug-use``
      - ``RegState::Debug``
+     - Register 'use' is for debugging purpose.
 
    * - ``renamable``
      - ``RegState::Renamable``
+     - Register that may be renamed.
 
 .. _subregister-indices:
 


        


More information about the llvm-commits mailing list