Module: Mesa
Branch: fn-verify-982374324
Commit: 4f969d796d6f8dbd3bc96d518d5f6d268b4a2d56
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f969d796d6f8dbd3bc96d518d5f6d268b4a2d56

Author: Alyssa Rosenzweig <[email protected]>
Date:   Mon Mar  1 16:01:22 2021 +0000

panfrost/lcra: Fix constraint counting

We need to iterate the whole row, we can't be clever and only look at
one side, the symmetry doesn't work like that. See the original paper.

total instructions in shared programs: 69392 -> 69322 (-0.10%)
instructions in affected programs: 9002 -> 8932 (-0.78%)
helped: 82
HURT: 28
Instructions are helped.

total bundles in shared programs: 32225 -> 32155 (-0.22%)
bundles in affected programs: 4286 -> 4216 (-1.63%)
helped: 82
HURT: 28
Bundles are helped.

total quadwords in shared programs: 56102 -> 56102 (0.00%)
quadwords in affected programs: 0 -> 0
helped: 0
HURT: 0

total registers in shared programs: 4552 -> 4572 (0.44%)
registers in affected programs: 298 -> 318 (6.71%)
helped: 18
HURT: 38
Registers are HURT.

total threads in shared programs: 3772 -> 3775 (0.08%)
threads in affected programs: 84 -> 87 (3.57%)
helped: 15
HURT: 14
Inconclusive result (value mean confidence interval includes 0).

total spills in shared programs: 0 -> 0
spills in affected programs: 0 -> 0
helped: 0
HURT: 0

total fills in shared programs: 0 -> 0
fills in affected programs: 0 -> 0
helped: 0
HURT: 0

Fixes: 66ad64d73d2 ("pan/midgard: Implement linearly-constrained register 
allocation")
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9338>

---

 src/panfrost/util/lcra.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/panfrost/util/lcra.c b/src/panfrost/util/lcra.c
index 49652829a48..45cff37e61f 100644
--- a/src/panfrost/util/lcra.c
+++ b/src/panfrost/util/lcra.c
@@ -207,15 +207,13 @@ lcra_set_node_spill_cost(struct lcra_state *l, unsigned 
node, signed cost)
                 l->spill_cost[node] = cost;
 }
 
-/* Count along the lower triangle */
-
 static unsigned
 lcra_count_constraints(struct lcra_state *l, unsigned i)
 {
         unsigned count = 0;
         unsigned *constraints = &l->linear[i * l->node_count];
 
-        for (unsigned j = 0; j < i; ++j)
+        for (unsigned j = 0; j < l->node_count; ++j)
                 count += util_bitcount(constraints[j]);
 
         return count;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to