aco/lower_phis: propagate constants before emitting merge code
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 30 Jun 2021 12:17:28 +0000 (14:17 +0200)
committerDaniel Schürmann <daniel@schuermann.dev>
Thu, 2 Sep 2021 14:41:52 +0000 (16:41 +0200)
commit207249d2b21a71b4950e84ce77d4b5af018d07f2
tree31c4dc2b58d18aba5c90b13ee29afe97fc9f35b0
parentaed7b7d1859f3d7037c129e49f692fb5dfc5ae15
aco/lower_phis: propagate constants before emitting merge code

This generalizes a previous optimization.

Totals from 521 (0.35% of 150170) affected shaders: (GFX10.3)
CodeSize: 1680348 -> 1678884 (-0.09%)
Instrs: 307994 -> 307628 (-0.12%)
Latency: 5799845 -> 5792655 (-0.12%)
InvThroughput: 994859 -> 994030 (-0.08%)
Copies: 18992 -> 18767 (-1.18%)
Branches: 10143 -> 10037 (-1.05%)
PreSGPRs: 21904 -> 21853 (-0.23%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11659>
src/amd/compiler/aco_lower_phis.cpp