[Mesa-dev] [PATCH 8/8] nir: Remove empty visit_call_src and visit_load_const_src functions
Jason Ekstrand
jason at jlekstrand.net
Mon Dec 14 15:39:43 PST 2015
On Mon, Dec 14, 2015 at 3:34 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> The guts were removed in dfb3abba. It has been almost exactly a year,
> so I dont think we're going to "decide we want [predication] back."
Yeah, I think that bridge is burned.
> Silences several "unused parameter" warnings:
>
> nir/nir.c: In function ‘visit_call_src’:
> nir/nir.c:1052:32: warning: unused parameter ‘instr’ [-Wunused-parameter]
> visit_call_src(nir_call_instr *instr, nir_foreach_src_cb cb, void *state)
> ^
> nir/nir.c:1052:58: warning: unused parameter ‘cb’ [-Wunused-parameter]
> visit_call_src(nir_call_instr *instr, nir_foreach_src_cb cb, void *state)
> ^
> nir/nir.c:1052:68: warning: unused parameter ‘state’ [-Wunused-parameter]
> visit_call_src(nir_call_instr *instr, nir_foreach_src_cb cb, void *state)
> ^
> nir/nir.c: In function ‘visit_load_const_src’:
> nir/nir.c:1058:44: warning: unused parameter ‘instr’ [-Wunused-parameter]
> visit_load_const_src(nir_load_const_instr *instr, nir_foreach_src_cb cb,
> ^
> nir/nir.c:1058:70: warning: unused parameter ‘cb’ [-Wunused-parameter]
> visit_load_const_src(nir_load_const_instr *instr, nir_foreach_src_cb cb,
> ^
> nir/nir.c:1059:28: warning: unused parameter ‘state’ [-Wunused-parameter]
> void *state)
> ^
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> Cc: Connor Abbott <cwabbott0 at gmail.com>
> ---
> src/glsl/nir/nir.c | 17 -----------------
> 1 file changed, 17 deletions(-)
>
> diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
> index 6bae05b..8c86135 100644
> --- a/src/glsl/nir/nir.c
> +++ b/src/glsl/nir/nir.c
> @@ -1049,19 +1049,6 @@ visit_intrinsic_src(nir_intrinsic_instr *instr, nir_foreach_src_cb cb,
> }
>
> static bool
> -visit_call_src(nir_call_instr *instr, nir_foreach_src_cb cb, void *state)
> -{
> - return true;
> -}
> -
> -static bool
> -visit_load_const_src(nir_load_const_instr *instr, nir_foreach_src_cb cb,
> - void *state)
> -{
> - return true;
> -}
> -
> -static bool
> visit_phi_src(nir_phi_instr *instr, nir_foreach_src_cb cb, void *state)
> {
> nir_foreach_phi_src(instr, src) {
> @@ -1117,12 +1104,8 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state)
> return false;
> break;
> case nir_instr_type_call:
> - if (!visit_call_src(nir_instr_as_call(instr), cb, state))
> - return false;
Please at least add a "Call instructions have no regular sources" comment.
> break;
> case nir_instr_type_load_const:
> - if (!visit_load_const_src(nir_instr_as_load_const(instr), cb, state))
> - return false;
Same for constant loads
With that added,
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
> break;
> case nir_instr_type_phi:
> if (!visit_phi_src(nir_instr_as_phi(instr), cb, state))
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list