[Mesa-dev] [PATCH 2/4] i965/vec4: Delete some dead code in visit(ir_expression *).

Ian Romanick idr at freedesktop.org
Thu Oct 16 08:58:47 PDT 2014


On 10/15/2014 08:51 PM, Kenneth Graunke wrote:
> Nothing uses the vector_elements temporary variable.

That's weird... was vector_elements ever used?

Either way, the changes are pretty straightforward.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> Setting this->result.file is dead because we overwrite this->result a
> few lines later.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> index 8e32d8b..683d1f5 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> @@ -1289,14 +1289,6 @@ vec4_visitor::visit(ir_expression *ir)
>        assert(!ir->operands[operand]->type->is_matrix());
>     }
>  
> -   int vector_elements = ir->operands[0]->type->vector_elements;
> -   if (ir->operands[1]) {
> -      vector_elements = MAX2(vector_elements,
> -			     ir->operands[1]->type->vector_elements);
> -   }
> -
> -   this->result.file = BAD_FILE;
> -
>     /* Storage for our result.  Ideally for an assignment we'd be using
>      * the actual storage for the result here, instead.
>      */
> 



More information about the mesa-dev mailing list