Skip to content

pan/bi: Optimize out some bitwise

Alyssa Rosenzweig requested to merge alyssa/mesa:bi/bitwise into main

This is a slight optimization that reduces the cycle count regression from idiv lowering. These instruction selection rules work on the principle that conversions have higher throughput than bitwise operations (on both Bifrost and Valhall).

Mali-G52:

total tuples in shared programs: 1928404 -> 1928399 (<.01%) tuples in affected programs: 2533 -> 2528 (-0.20%) helped: 9 HURT: 2 helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1 helped stats (rel) min: 0.42% max: 0.68% x̄: 0.54% x̃: 0.53% HURT stats (abs) min: 2.0 max: 2.0 x̄: 2.00 x̃: 2 HURT stats (rel) min: 0.48% max: 0.48% x̄: 0.48% x̃: 0.48% 95% mean confidence interval for tuples value: -1.27 0.36 95% mean confidence interval for tuples %-change: -0.64% -0.07% Inconclusive result (value mean confidence interval includes 0).

total clauses in shared programs: 354953 -> 354952 (<.01%) clauses in affected programs: 26 -> 25 (-3.85%) helped: 1 HURT: 0

total cycles in shared programs: 166558.90 -> 166558.85 (<.01%) cycles in affected programs: 6.88 -> 6.83 (-0.61%) helped: 1 HURT: 0

total arith in shared programs: 73686.13 -> 73685.92 (<.01%) arith in affected programs: 91.88 -> 91.67 (-0.23%) helped: 9 HURT: 2 helped stats (abs) min: 0.04166700000000034 max: 0.04166700000000034 x̄: 0.04 x̃: 0 helped stats (rel) min: 0.50% max: 0.79% x̄: 0.62% x̃: 0.61% HURT stats (abs) min: 0.08333299999999966 max: 0.08333299999999966 x̄: 0.08 x̃: 0 HURT stats (rel) min: 0.55% max: 0.55% x̄: 0.55% x̃: 0.55% 95% mean confidence interval for arith value: -0.05 0.02 95% mean confidence interval for arith %-change: -0.73% -0.08% Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 1674415 -> 1674404 (<.01%) quadwords in affected programs: 5880 -> 5869 (-0.19%) helped: 15 HURT: 2 helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1 helped stats (rel) min: 0.15% max: 0.81% x̄: 0.46% x̃: 0.52% HURT stats (abs) min: 2.0 max: 2.0 x̄: 2.00 x̃: 2 HURT stats (rel) min: 0.53% max: 0.53% x̄: 0.53% x̃: 0.53% 95% mean confidence interval for quadwords value: -1.16 -0.13 95% mean confidence interval for quadwords %-change: -0.55% -0.13% Quadwords are helped.

Mali-G57:

total instructions in shared programs: 2674853 -> 2674844 (<.01%) instructions in affected programs: 2045 -> 2036 (-0.44%) helped: 9 HURT: 0 helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1 helped stats (rel) min: 0.32% max: 1.37% x̄: 0.52% x̃: 0.41% 95% mean confidence interval for instructions value: -1.00 -1.00 95% mean confidence interval for instructions %-change: -0.78% -0.27% Instructions are helped.

total cycles in shared programs: 140627.36 -> 140627.30 (<.01%) cycles in affected programs: 2.31 -> 2.25 (-2.70%) helped: 1 HURT: 0

total cvt in shared programs: 14127.11 -> 14127.64 (<.01%) cvt in affected programs: 99.27 -> 99.80 (0.54%) helped: 0 HURT: 18 HURT stats (abs) min: 0.015625 max: 0.09375 x̄: 0.03 x̃: 0 HURT stats (rel) min: 0.27% max: 2.13% x̄: 0.68% x̃: 0.56% 95% mean confidence interval for cvt value: 0.02 0.04 95% mean confidence interval for cvt %-change: 0.45% 0.91% Cvt are HURT.

total sfu in shared programs: 7555.69 -> 7553 (-0.04%) sfu in affected programs: 56.94 -> 54.25 (-4.72%) helped: 18 HURT: 0 helped stats (abs) min: 0.0625 max: 0.375 x̄: 0.15 x̃: 0 helped stats (rel) min: 1.34% max: 33.33% x̄: 17.81% x̃: 12.04% 95% mean confidence interval for sfu value: -0.19 -0.11 95% mean confidence interval for sfu %-change: -25.13% -10.48% Sfu are helped.

Signed-off-by: Alyssa Rosenzweig alyssa@collabora.com

Merge request reports

Loading