compiler: replace MAYBE_UNUSED with UNUSED
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 22 Jun 2019 14:21:44 +0000 (15:21 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 31 Jul 2019 08:41:05 +0000 (09:41 +0100)
MAYBE_UNUSED is going away, so let's replace legitimate uses of it with
UNUSED, which the former aliased to so far anyway.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/nir/nir_constant_expressions.py
src/compiler/nir/nir_opt_loop_unroll.c
src/compiler/nir/nir_search.c
src/compiler/spirv/vtn_cfg.c

index c6068ac932721cb1f38ebdf8f69cb7115de37a24..15f271234d5446dfbb15905938afaaaf632598d9 100644 (file)
@@ -598,7 +598,7 @@ struct _mesa_glsl_extension {
 
 /** Checks if the context supports a user-facing extension */
 #define EXT(name_str, driver_cap, ...) \
-static MAYBE_UNUSED bool \
+static UNUSED bool \
 has_##name_str(const struct gl_context *ctx, gl_api api, uint8_t version) \
 { \
    return ctx->Extensions.driver_cap && (version >= \
index ed420c300f2e4574d87731a0103616fc6670d628..fca14602855acca5abebec049126614906b15bee 100644 (file)
@@ -384,9 +384,9 @@ struct ${type}${width}_vec {
 % for name, op in sorted(opcodes.items()):
 static void
 evaluate_${name}(nir_const_value *_dst_val,
-                 MAYBE_UNUSED unsigned num_components,
+                 UNUSED unsigned num_components,
                  ${"UNUSED" if op_bit_sizes(op) is None else ""} unsigned bit_size,
-                 MAYBE_UNUSED nir_const_value **_src)
+                 UNUSED nir_const_value **_src)
 {
    % if op_bit_sizes(op) is not None:
       switch (bit_size) {
index c01983907495d5d4e57303252c85fdfc87466cad..55075824507f032b993e10b2a78a200538c5b149 100644 (file)
@@ -491,7 +491,7 @@ complex_unroll_single_terminator(nir_loop *loop)
    unsigned num_times_to_clone = loop->info->max_trip_count + 1;
 
    nir_cf_list lp_body;
-   MAYBE_UNUSED nir_cf_node *unroll_loc =
+   UNUSED nir_cf_node *unroll_loc =
       complex_unroll_loop_body(loop, terminator, &lp_header, &lp_body,
                                remap_table, num_times_to_clone);
 
index c62de4ad7febc6b36e4d435845b8ca6dd38d2c57..437f2bf39a7a0d3fdb8e42a4d6fe266b57f15764 100644 (file)
@@ -549,7 +549,7 @@ construct_value(nir_builder *build,
    }
 }
 
-MAYBE_UNUSED static void dump_value(const nir_search_value *val)
+UNUSED static void dump_value(const nir_search_value *val)
 {
    switch (val->type) {
    case nir_search_value_constant: {
index db3c46a0de62ed7ca049faebeae16dcc1b9787ff..843966f86b5fc80627225de41bbff9be03271939 100644 (file)
@@ -248,7 +248,7 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode,
       list_inithead(&b->func->body);
       b->func->control = w[3];
 
-      MAYBE_UNUSED const struct glsl_type *result_type =
+      UNUSED const struct glsl_type *result_type =
          vtn_value(b, w[1], vtn_value_type_type)->type->type;
       struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_function);
       val->func = b->func;