nir: Drop "struct" from some nir_* declarations
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 17 Apr 2019 22:01:14 +0000 (17:01 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 18 Apr 2019 17:12:44 +0000 (17:12 +0000)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_instr_set.c
src/compiler/nir/nir_opt_comparison_pre.c

index 8cdc4ba5707dfc575b8435aca3b01fbd9e0e9026..672151f32791e17eb357dc3707e1206f54763115 100644 (file)
@@ -2756,13 +2756,13 @@ nir_src_instr(const struct nir_src *src)
 
 #define NIR_SRC_AS_(name, c_type, type_enum, cast_macro)                \
 static inline c_type *                                                  \
-nir_src_as_ ## name (struct nir_src *src)                               \
+nir_src_as_ ## name (nir_src *src)                                      \
 {                                                                       \
     return src->is_ssa && src->ssa->parent_instr->type == type_enum     \
            ? cast_macro(src->ssa->parent_instr) : NULL;                 \
 }                                                                       \
 static inline const c_type *                                            \
-nir_src_as_ ## name ## _const(const struct nir_src *src)                \
+nir_src_as_ ## name ## _const(const nir_src *src)                       \
 {                                                                       \
     return src->is_ssa && src->ssa->parent_instr->type == type_enum     \
            ? cast_macro(src->ssa->parent_instr) : NULL;                 \
index d53e044c9017d271f43b0b5de993e84e6b9c4c21..6605d2a1ab39ee14dca1b02a3a9b5d62f5d84180 100644 (file)
@@ -281,10 +281,10 @@ nir_srcs_equal(nir_src src1, nir_src src2)
  * that instruction is returned as a \c nir_alu_instr.  Otherwise \c NULL is
  * returned.
  */
-static const struct nir_alu_instr *
+static const nir_alu_instr *
 get_neg_instr(const nir_src *s)
 {
-   const struct nir_alu_instr *const alu = nir_src_as_alu_instr_const(s);
+   const nir_alu_instr *const alu = nir_src_as_alu_instr_const(s);
 
    return alu != NULL && (alu->op == nir_op_fneg || alu->op == nir_op_ineg)
           ? alu : NULL;
@@ -440,7 +440,7 @@ nir_alu_srcs_negative_equal(const nir_alu_instr *alu1,
 
    uint8_t alu1_swizzle[4] = {0};
    nir_src alu1_actual_src;
-   const struct nir_alu_instr *const neg1 = get_neg_instr(&alu1->src[src1].src);
+   const nir_alu_instr *const neg1 = get_neg_instr(&alu1->src[src1].src);
 
    if (neg1) {
       parity = !parity;
@@ -457,7 +457,7 @@ nir_alu_srcs_negative_equal(const nir_alu_instr *alu1,
 
    uint8_t alu2_swizzle[4] = {0};
    nir_src alu2_actual_src;
-   const struct nir_alu_instr *const neg2 = get_neg_instr(&alu2->src[src2].src);
+   const nir_alu_instr *const neg2 = get_neg_instr(&alu2->src[src2].src);
 
    if (neg2) {
       parity = !parity;
index ab31a2bf55466a34e2d90e271564c8e161566023..eee496251a7b91ceb6fe00374a34ea9af1ac30c6 100644 (file)
@@ -106,8 +106,8 @@ push_block(struct block_queue *bq)
    }
 
    if (!u_vector_init(&bi->instructions,
-                      sizeof(struct nir_alu_instr *),
-                      8 * sizeof(struct nir_alu_instr *)))
+                      sizeof(nir_alu_instr *),
+                      8 * sizeof(nir_alu_instr *)))
       return NULL;
 
    exec_list_push_tail(&bq->blocks, &bi->node);
@@ -125,9 +125,9 @@ pop_block(struct block_queue *bq, struct block_instructions *bi)
 
 static void
 add_instruction_for_block(struct block_instructions *bi,
-                          struct nir_alu_instr *alu)
+                          nir_alu_instr *alu)
 {
-   struct nir_alu_instr **data =
+   nir_alu_instr **data =
       u_vector_add(&bi->instructions);
 
    *data = alu;
@@ -227,7 +227,7 @@ comparison_pre_block(nir_block *block, struct block_queue *bq, nir_builder *bld)
       if (instr->type != nir_instr_type_alu)
          continue;
 
-      struct nir_alu_instr *const alu = nir_instr_as_alu(instr);
+      nir_alu_instr *const alu = nir_instr_as_alu(instr);
 
       if (alu->dest.dest.ssa.num_components != 1)
          continue;