Mesa (main): ir3: Document RA-related register flags better

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 6 15:11:41 UTC 2021


Module: Mesa
Branch: main
Commit: e9d2d3ae17771af3e399030b1e9615715ca1aae7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9d2d3ae17771af3e399030b1e9615715ca1aae7

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Thu Aug  5 16:54:17 2021 +0200

ir3: Document RA-related register flags better

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12216>

---

 src/freedreno/ir3/ir3.h | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h
index 53590ed8afb..723eb6567ed 100644
--- a/src/freedreno/ir3/ir3.h
+++ b/src/freedreno/ir3/ir3.h
@@ -126,11 +126,24 @@ struct ir3_register {
       /* meta-flags, for intermediate stages of IR, ie.
        * before register assignment is done:
        */
-      IR3_REG_SSA = 0x4000, /* 'instr' is ptr to assigning instr */
+      IR3_REG_SSA = 0x4000, /* 'def' is ptr to assigning destination */
       IR3_REG_ARRAY = 0x8000,
 
+      /* Set on a use whenever the SSA value becomes dead after the current
+       * instruction.
+       */
       IR3_REG_KILL = 0x10000,
+
+      /* Similar to IR3_REG_KILL, except that if there are multiple uses of the
+       * same SSA value in a single instruction, this is only set on the first
+       * use.
+       */
       IR3_REG_FIRST_KILL = 0x20000,
+
+      /* Set when a destination doesn't have any uses and is dead immediately
+       * after the instruction. This can happen even after optimizations for
+       * corner cases such as destinations of atomic instructions.
+       */
       IR3_REG_UNUSED = 0x40000,
    } flags;
 



More information about the mesa-commit mailing list