nir/loop_analyze: initialize loop variables on demand
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 5 Nov 2020 15:03:15 +0000 (15:03 +0000)
committerRhys Perry <pendingchaos02@gmail.com>
Fri, 20 Nov 2020 13:57:34 +0000 (13:57 +0000)
commit4832262560d3156cf47be14c52128ae2da4c7371
tree536da0a6339049929f695d699b5511b46df3d5ce
parentbe7b20135e50a15081de54fb24c731503df660a5
nir/loop_analyze: initialize loop variables on demand

Zero'ing the allocation and calling initialize_ssa_def() for every
ssa def can be expensive. Since we only use a subset of the allocated
variables, initialize it only when needed.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
src/compiler/nir/nir_loop_analyze.c