nir: Drop the high_offset argument to the load_store_vectorizer filter.
authorEric Anholt <eric@anholt.net>
Tue, 8 Sep 2020 18:12:56 +0000 (11:12 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 30 Sep 2020 19:53:43 +0000 (19:53 +0000)
Nothing uses it, and it's not clear to me what it provides over
alignment/num_components/bit_size.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

src/amd/compiler/aco_instruction_selection_setup.cpp
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_load_store_vectorize.c
src/compiler/nir/tests/load_store_vectorizer_tests.cpp
src/intel/compiler/brw_nir.c

index e4b837c..367524c 100644 (file)
@@ -385,7 +385,7 @@ type_size(const struct glsl_type *type, bool bindless)
 bool
 mem_vectorize_callback(unsigned align_mul, unsigned align_offset,
                        unsigned bit_size,
-                       unsigned num_components, unsigned high_offset,
+                       unsigned num_components,
                        nir_intrinsic_instr *low, nir_intrinsic_instr *high)
 {
    if (num_components > 4)
index 80d89b7..5ac6259 100644 (file)
@@ -4854,7 +4854,7 @@ bool nir_opt_conditional_discard(nir_shader *shader);
 typedef bool (*nir_should_vectorize_mem_func)(unsigned align_mul,
                                               unsigned align_offset,
                                               unsigned bit_size,
-                                              unsigned num_components, unsigned high_offset,
+                                              unsigned num_components,
                                               nir_intrinsic_instr *low, nir_intrinsic_instr *high);
 
 bool nir_opt_load_store_vectorize(nir_shader *shader, nir_variable_mode modes,
index 6ae6903..51405fa 100644 (file)
@@ -670,7 +670,7 @@ new_bitsize_acceptable(struct vectorize_ctx *ctx, unsigned new_bit_size,
    if (!ctx->callback(low->align_mul,
                       low->align_offset,
                       new_bit_size, new_num_components,
-                      high_offset, low->intrin, high->intrin))
+                      low->intrin, high->intrin))
       return false;
 
    if (low->is_store) {
index dd9d401..0f49d30 100644 (file)
@@ -72,7 +72,7 @@ protected:
 
    static bool mem_vectorize_callback(unsigned align_mul, unsigned align_offset,
                                       unsigned bit_size,
-                                      unsigned num_components, unsigned high_offset,
+                                      unsigned num_components,
                                       nir_intrinsic_instr *low, nir_intrinsic_instr *high);
    static void shared_type_info(const struct glsl_type *type, unsigned *size, unsigned *align);
 
@@ -365,7 +365,7 @@ bool nir_load_store_vectorize_test::test_alu_def(
 
 bool nir_load_store_vectorize_test::mem_vectorize_callback(
    unsigned align_mul, unsigned align_offset, unsigned bit_size,
-   unsigned num_components, unsigned high_offset,
+   unsigned num_components,
    nir_intrinsic_instr *low, nir_intrinsic_instr *high)
 {
    return bit_size / 8;
index c1af534..0de36e6 100644 (file)
@@ -857,7 +857,7 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
 static bool
 brw_nir_should_vectorize_mem(unsigned align_mul, unsigned align_offset,
                              unsigned bit_size,
-                             unsigned num_components, unsigned high_offset,
+                             unsigned num_components,
                              nir_intrinsic_instr *low,
                              nir_intrinsic_instr *high)
 {