agx: Only use nest by 1 for loops w/o continue
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 29 Aug 2023 22:39:37 +0000 (18:39 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 5 Sep 2023 18:50:34 +0000 (18:50 +0000)
commit139e56c0dba0cef757e31b32009ccaca3b54080f
tree0017e9c1073898ad453e155938336c1b4977618d
parent8f06252e9b1f1a1dae01e37dcadb8e87b8500e38
agx: Only use nest by 1 for loops w/o continue

Apple doesn't do this, but it should be equivalent and it makes it easier to see
that we can use while_icmp for break_if_icmp in loops that don't use continue
(which Apple does do). So, the effect of this commit is to use while_icmp for
most breaks, which saves an instruction.

   total instructions in shared programs: 1764199 -> 1764076 (<.01%)
   instructions in affected programs: 24149 -> 24026 (-0.51%)
   helped: 78
   HURT: 0
   Instructions are helped.

   total bytes in shared programs: 11609306 -> 11608322 (<.01%)
   bytes in affected programs: 164604 -> 163620 (-0.60%)
   helped: 78
   HURT: 0
   Bytes are helped.

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