From 6f81e2b9943c3d2f42b96e1c158e253ba0283784 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Sat, 2 Jun 2018 15:08:18 -0700 Subject: intel/eu: Get rid of the return value of brw_send_indirect_message(). The return value is not used anymore. This allows simplifying the code slightly, and in addition it should frustrate anybody's attempts to continue using the obsolete piecemeal approach to construct a message descriptor in combination with brw_send_indirect_message(). Reviewed-by: Kenneth Graunke --- src/intel/compiler/brw_eu.h | 8 ++------ src/intel/compiler/brw_eu_emit.c | 17 +++-------------- 2 files changed, 5 insertions(+), 20 deletions(-) (limited to 'src/intel') diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index 884f1fbaabe..3824ab2ec6a 100644 --- a/src/intel/compiler/brw_eu.h +++ b/src/intel/compiler/brw_eu.h @@ -394,13 +394,9 @@ void brw_urb_WRITE(struct brw_codegen *p, /** * Send message to shared unit \p sfid with a possibly indirect descriptor \p * desc. If \p desc is not an immediate it will be transparently loaded to an - * address register using an OR instruction. The returned instruction can be - * passed as argument to the usual brw_set_*_message() functions in order to - * specify any additional descriptor bits -- If \p desc is an immediate this - * will be the SEND instruction itself, otherwise it will be the OR - * instruction. + * address register using an OR instruction. */ -struct brw_inst * +void brw_send_indirect_message(struct brw_codegen *p, unsigned sfid, struct brw_reg dst, diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c index 00e255461e1..2346d1a966c 100644 --- a/src/intel/compiler/brw_eu_emit.c +++ b/src/intel/compiler/brw_eu_emit.c @@ -2418,7 +2418,7 @@ void brw_urb_WRITE(struct brw_codegen *p, swizzle); } -struct brw_inst * +void brw_send_indirect_message(struct brw_codegen *p, unsigned sfid, struct brw_reg dst, @@ -2428,20 +2428,12 @@ brw_send_indirect_message(struct brw_codegen *p, { const struct gen_device_info *devinfo = p->devinfo; struct brw_inst *send; - int setup; dst = retype(dst, BRW_REGISTER_TYPE_UW); assert(desc.type == BRW_REGISTER_TYPE_UD); - /* We hold on to the setup instruction (the SEND in the direct case, the OR - * in the indirect case) by its index in the instruction store. The - * pointer returned by next_insn() may become invalid if emitting the SEND - * in the indirect case reallocs the store. - */ - if (desc.file == BRW_IMMEDIATE_VALUE) { - setup = p->nr_insn; send = next_insn(p, BRW_OPCODE_SEND); brw_set_desc(p, send, desc.ud | desc_imm); @@ -2455,10 +2447,9 @@ brw_send_indirect_message(struct brw_codegen *p, brw_set_default_predicate_control(p, BRW_PREDICATE_NONE); /* Load the indirect descriptor to an address register using OR so the - * caller can specify additional descriptor bits with the usual - * brw_set_*_message() helper functions. + * caller can specify additional descriptor bits with the desc_imm + * immediate. */ - setup = p->nr_insn; brw_OR(p, addr, desc, brw_imm_ud(desc_imm)); brw_pop_insn_state(p); @@ -2473,8 +2464,6 @@ brw_send_indirect_message(struct brw_codegen *p, brw_set_dest(p, send, dst); brw_set_src0(p, send, retype(payload, BRW_REGISTER_TYPE_UD)); brw_inst_set_sfid(devinfo, send, sfid); - - return &p->store[setup]; } static void -- cgit v1.2.3