nir: Add an array copy optimization
This peephole optimization looks for a series of load/store_deref or copy_deref instructions that copy an array from one variable to another and turns it into a copy_deref that copies the entire array. The pattern it looks for is extremely specific but it's good enough to pick up on the input array copies in DXVK and should also be able to pick up the sequence generated by spirv_to_nir for a OpLoad of a large composite followed by OpStore. It can always be improved later if needed. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
@@ -158,6 +158,7 @@ files_libnir = files(
|
||||
'nir_opt_cse.c',
|
||||
'nir_opt_dce.c',
|
||||
'nir_opt_dead_cf.c',
|
||||
'nir_opt_find_array_copies.c',
|
||||
'nir_opt_gcm.c',
|
||||
'nir_opt_global_to_local.c',
|
||||
'nir_opt_if.c',
|
||||
|
Reference in New Issue
Block a user