[Mesa-dev] [PATCH] nv50/ir: don't test for a 4th bit when count==3 in BitSet::findFreeRange

Rhys Perry pendingchaos02 at gmail.com
Sun Oct 28 14:11:08 UTC 2018


Requiring a 4th component to be free when only 3 is needed for compounds
limits the RA's options.

total instructions in shared programs : 7696203 -> 7695915 (-0.00%)
total gprs used in shared programs    : 804270 -> 802998 (-0.16%)
total shared used in shared programs  : 639636 -> 639636 (0.00%)
total local used in shared programs   : 24648 -> 24648 (0.00%)

                 local      shared         gpr        inst       bytes
    helped           0           0         862         205         205
      hurt           0           0         119         109         109
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp
index 1daf778e93..64f6c0f01d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp
@@ -340,7 +340,9 @@ int BitSet::findFreeRange(unsigned int count) const
          if (data[i] != 0xffffffff) {
             uint32_t b =
                (data[i] >> 0) | (data[i] >> 1) |
-               (data[i] >> 2) | (data[i] >> 3) | 0xeeeeeeee;
+               (data[i] >> 2) | 0xeeeeeeee;
+            if (count == 4)
+               b |= data[i] >> 3;
             pos = ffs(~b) - 1;
             if (pos >= 0)
                break;
-- 
2.17.2



More information about the mesa-dev mailing list