intel: Run the optimization loop before and after lowering int64
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 12 Jul 2019 23:47:15 +0000 (18:47 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Sat, 13 Jul 2019 02:59:28 +0000 (02:59 +0000)
commit974fabe810cad996cdf0c1acbcd1cba6e04f7357
treebd3e96c0876c94b794546420ba4ab683b09098b5
parent7103baf01fcf8ce9424189d4180246b86ab3344e
intel: Run the optimization loop before and after lowering int64

For bindless SSBO access, we have to do 64-bit address calculations.  On
ICL and above, we don't have 64-bit integer support so we have to lower
the address calculations to 32-bit arithmetic.  If we don't run the
optimization loop before lowering, we won't fold any of the address
chain calculations before lowering 64-bit arithmetic and they aren't
really foldable afterwards.  This cuts the size of the generated code in
the compute shader in dEQP-VK.ssbo.phys.layout.random.16bit.scalar.13 by
around 30%.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/compiler/brw_nir.c