agx: Clean up after lowering address arithmetic
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Wed, 15 Feb 2023 05:02:14 +0000 (00:02 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sun, 5 Mar 2023 09:27:02 +0000 (09:27 +0000)
commit445ca949cd82ee84579395d69f64ae228218833d
tree6d81fdc362a7ede8819a524f5574b0088ece18c9
parent4b1f4b86ea3d687f2f356aabe06b483887367456
agx: Clean up after lowering address arithmetic

This avoids creating silly preambles that don't actually do anything except push
a constant that we could've inlined for cheaper anyway, since nir_opt_preamble's
cost model is sensitive to e.g. constant folding.

This avoids a pointless preamble in split-hell.

As a nice bonus, this also improves compile-time on address-heavy shaders. With
a release build, CPU time in dEQP-GLES31.functional.ssbo.* reduces from 12.87s
to 10.77... a 16% improvement is nothing to sneeze at.

shader-db results are mostly noise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
src/asahi/compiler/agx_compile.c