agx: Inline 16-bit load/store offsets
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 18 Feb 2023 22:06:16 +0000 (17:06 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sun, 5 Mar 2023 09:27:02 +0000 (09:27 +0000)
commita9c5956f2fbbcb7df068955a69c67de3ac8a8268
tree0d88e834e0291bf7e0d99753e37114bc0019b02c
parentc9728b41d51d949e48995641a5a9f7c4a205ef9e
agx: Inline 16-bit load/store offsets

Most integer immediates are only 8-bit, but load/store instructions allow their
immediate offsets to be 16-bit instead. Take advantage of this in the optimizer.
This eliminates 36% of the instructions in
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36, a fitting
percentage.

Insignificant effect on dEQP-GLES31.functional.ssbo.* performance... Only a
small % of our compile-time pie is actually spent in the backend anyway (as
opposed to NIR passes or GLSL IR).

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