[PATCH] D84634: [NFC] [MIR] Document the reg state flags

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 03:58:55 PDT 2020


djtodoro created this revision.
djtodoro added reviewers: craig.topper, aprantl, dblaikie.
djtodoro added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds documentation for the RegState enumeration.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84634

Files:
  llvm/include/llvm/CodeGen/MachineInstrBuilder.h


Index: llvm/include/llvm/CodeGen/MachineInstrBuilder.h
===================================================================
--- llvm/include/llvm/CodeGen/MachineInstrBuilder.h
+++ llvm/include/llvm/CodeGen/MachineInstrBuilder.h
@@ -40,20 +40,22 @@
 
 namespace RegState {
 
-  enum {
-    Define         = 0x2,
-    Implicit       = 0x4,
-    Kill           = 0x8,
-    Dead           = 0x10,
-    Undef          = 0x20,
-    EarlyClobber   = 0x40,
-    Debug          = 0x80,
-    InternalRead   = 0x100,
-    Renamable      = 0x200,
-    DefineNoRead   = Define | Undef,
-    ImplicitDefine = Implicit | Define,
-    ImplicitKill   = Implicit | Kill
-  };
+enum {
+  Define = 0x2,         ///< Register definition.
+  Implicit = 0x4,       ///< Not emitted register (e.g. carry, or
+                        ///< temporary result).
+  Kill = 0x8,           ///< The last use of a register.
+  Dead = 0x10,          ///< Unused definition.
+  Undef = 0x20,         ///< Value of the register doesn't matter.
+  EarlyClobber = 0x40,  ///< Register definition happens before uses.
+  Debug = 0x80,         ///< Register 'use' is for debugging purpose.
+  InternalRead = 0x100, ///< Register reads a value that is defined
+                        ///< inside the same instruction or bundle.
+  Renamable = 0x200,    ///< Register that may be renamed.
+  DefineNoRead = Define | Undef,
+  ImplicitDefine = Implicit | Define,
+  ImplicitKill = Implicit | Kill
+};
 
 } // end namespace RegState
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84634.280845.patch
Type: text/x-patch
Size: 1491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200727/a72359a4/attachment.bin>


More information about the llvm-commits mailing list