freedreno/ir3: shuffle a few ir3_register fields
authorRob Clark <robdclark@chromium.org>
Tue, 17 Dec 2019 17:09:16 +0000 (09:09 -0800)
committerMarge Bot <eric+marge@anholt.net>
Sat, 1 Feb 2020 02:40:22 +0000 (02:40 +0000)
It makes life easier for postsched to always be able to rely on wrmask.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>

src/freedreno/ir3/ir3.h

index 461ff63..a8ce9ea 100644 (file)
@@ -102,6 +102,22 @@ struct ir3_register {
 
        } flags;
 
+       /* used for cat5 instructions, but also for internal/IR level
+        * tracking of what registers are read/written by an instruction.
+        * wrmask may be a bad name since it is used to represent both
+        * src and dst that touch multiple adjacent registers.
+        */
+       unsigned wrmask : 16;  /* up to vec16 */
+
+       /* for relative addressing, 32bits for array size is too small,
+        * but otoh we don't need to deal with disjoint sets, so instead
+        * use a simple size field (number of scalar components).
+        *
+        * Note the size field isn't important for relative const (since
+        * we don't have to do register allocation for constants).
+        */
+       unsigned size : 15;
+
        bool merged : 1;    /* half-regs conflict with full regs (ie >= a6xx) */
 
        /* normal registers:
@@ -129,20 +145,6 @@ struct ir3_register {
         * back to a previous instruction that we depend on).
         */
        struct ir3_instruction *instr;
-
-       union {
-               /* used for cat5 instructions, but also for internal/IR level
-                * tracking of what registers are read/written by an instruction.
-                * wrmask may be a bad name since it is used to represent both
-                * src and dst that touch multiple adjacent registers.
-                */
-               unsigned wrmask;
-               /* for relative addressing, 32bits for array size is too small,
-                * but otoh we don't need to deal with disjoint sets, so instead
-                * use a simple size field (number of scalar components).
-                */
-               unsigned size;
-       };
 };
 
 /*