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