<p dir="ltr"><br>
On May 19, 2016 2:42 PM, "Matt Turner" <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br>
><br>
> Cuts 6K of .text.</p>
<p dir="ltr">Nice!</p>
<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></p>
<p dir="ltr">> text data bss dec hex filename<br>
> 5772372 264648 29320 6066340 5c90a4 lib/i965_dri.so before<br>
> 5766074 264648 29320 6060042 5c780a lib/i965_dri.so after<br>
> ---<br>
> src/mesa/drivers/dri/i965/brw_fs.h | 4 ++--<br>
> src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 4 ++--<br>
> src/mesa/drivers/dri/i965/brw_vec4.h | 12 ++++++------<br>
> src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 12 ++++++------<br>
> 4 files changed, 16 insertions(+), 16 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h<br>
> index ac270cd..ab79cc8 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs.h<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs.h<br>
> @@ -256,8 +256,8 @@ public:<br>
> nir_tex_instr *instr);<br>
> void nir_emit_jump(const brw::fs_builder &bld,<br>
> nir_jump_instr *instr);<br>
> - fs_reg get_nir_src(nir_src src);<br>
> - fs_reg get_nir_dest(nir_dest dest);<br>
> + fs_reg get_nir_src(const nir_src &src);<br>
> + fs_reg get_nir_dest(const nir_dest &dest);<br>
> fs_reg get_nir_image_deref(const nir_deref_var *deref);<br>
> fs_reg get_indirect_offset(nir_intrinsic_instr *instr);<br>
> void emit_percomp(const brw::fs_builder &bld, const fs_inst &inst,<br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp<br>
> index ebcc92a..c12e8ee 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp<br>
> @@ -1451,7 +1451,7 @@ fs_visitor::nir_emit_undef(const fs_builder &bld, nir_ssa_undef_instr *instr)<br>
> }<br>
><br>
> fs_reg<br>
> -fs_visitor::get_nir_src(nir_src src)<br>
> +fs_visitor::get_nir_src(const nir_src &src)<br>
> {<br>
> fs_reg reg;<br>
> if (src.is_ssa) {<br>
> @@ -1471,7 +1471,7 @@ fs_visitor::get_nir_src(nir_src src)<br>
> }<br>
><br>
> fs_reg<br>
> -fs_visitor::get_nir_dest(nir_dest dest)<br>
> +fs_visitor::get_nir_dest(const nir_dest &dest)<br>
> {<br>
> if (dest.is_ssa) {<br>
> const brw_reg_type reg_type =<br>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h<br>
> index bc54eaf..76dea04 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_vec4.h<br>
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.h<br>
> @@ -326,14 +326,14 @@ public:<br>
> virtual void nir_emit_undef(nir_ssa_undef_instr *instr);<br>
> virtual void nir_emit_ssbo_atomic(int op, nir_intrinsic_instr *instr);<br>
><br>
> - dst_reg get_nir_dest(nir_dest dest, enum brw_reg_type type);<br>
> - dst_reg get_nir_dest(nir_dest dest, nir_alu_type type);<br>
> - dst_reg get_nir_dest(nir_dest dest);<br>
> - src_reg get_nir_src(nir_src src, enum brw_reg_type type,<br>
> + dst_reg get_nir_dest(const nir_dest &dest, enum brw_reg_type type);<br>
> + dst_reg get_nir_dest(const nir_dest &dest, nir_alu_type type);<br>
> + dst_reg get_nir_dest(const nir_dest &dest);<br>
> + src_reg get_nir_src(const nir_src &src, enum brw_reg_type type,<br>
> unsigned num_components = 4);<br>
> - src_reg get_nir_src(nir_src src, nir_alu_type type,<br>
> + src_reg get_nir_src(const nir_src &src, nir_alu_type type,<br>
> unsigned num_components = 4);<br>
> - src_reg get_nir_src(nir_src src,<br>
> + src_reg get_nir_src(const nir_src &src,<br>
> unsigned num_components = 4);<br>
> src_reg get_indirect_offset(nir_intrinsic_instr *instr);<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp<br>
> index 29f52fa..f3b4528 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp<br>
> @@ -267,7 +267,7 @@ dst_reg_for_nir_reg(vec4_visitor *v, nir_register *nir_reg,<br>
> }<br>
><br>
> dst_reg<br>
> -vec4_visitor::get_nir_dest(nir_dest dest)<br>
> +vec4_visitor::get_nir_dest(const nir_dest &dest)<br>
> {<br>
> if (dest.is_ssa) {<br>
> dst_reg dst = dst_reg(VGRF, alloc.allocate(1));<br>
> @@ -280,19 +280,19 @@ vec4_visitor::get_nir_dest(nir_dest dest)<br>
> }<br>
><br>
> dst_reg<br>
> -vec4_visitor::get_nir_dest(nir_dest dest, enum brw_reg_type type)<br>
> +vec4_visitor::get_nir_dest(const nir_dest &dest, enum brw_reg_type type)<br>
> {<br>
> return retype(get_nir_dest(dest), type);<br>
> }<br>
><br>
> dst_reg<br>
> -vec4_visitor::get_nir_dest(nir_dest dest, nir_alu_type type)<br>
> +vec4_visitor::get_nir_dest(const nir_dest &dest, nir_alu_type type)<br>
> {<br>
> return get_nir_dest(dest, brw_type_for_nir_type(type));<br>
> }<br>
><br>
> src_reg<br>
> -vec4_visitor::get_nir_src(nir_src src, enum brw_reg_type type,<br>
> +vec4_visitor::get_nir_src(const nir_src &src, enum brw_reg_type type,<br>
> unsigned num_components)<br>
> {<br>
> dst_reg reg;<br>
> @@ -314,14 +314,14 @@ vec4_visitor::get_nir_src(nir_src src, enum brw_reg_type type,<br>
> }<br>
><br>
> src_reg<br>
> -vec4_visitor::get_nir_src(nir_src src, nir_alu_type type,<br>
> +vec4_visitor::get_nir_src(const nir_src &src, nir_alu_type type,<br>
> unsigned num_components)<br>
> {<br>
> return get_nir_src(src, brw_type_for_nir_type(type), num_components);<br>
> }<br>
><br>
> src_reg<br>
> -vec4_visitor::get_nir_src(nir_src src, unsigned num_components)<br>
> +vec4_visitor::get_nir_src(const nir_src &src, unsigned num_components)<br>
> {<br>
> /* if type is not specified, default to signed int */<br>
> return get_nir_src(src, nir_type_int, num_components);<br>
> --<br>
> 2.7.3<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>