[Mesa-dev] [PATCH 2/4] nir: mark *prev_block as MAYBE_UNUSED in opt_peel_loop_initial_if
Timothy Arceri
tarceri at itsqueeze.com
Sat Aug 18 00:31:53 UTC 2018
On 18/08/18 10:28, Timothy Arceri wrote:
> Thanks I'd been meaning to do this too.
>
> Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
>
> Do you have commit access?
Nevermind I should have read the cover letter. I'll push the first 3,
I'll leave patch 4 for someone at AMD to comment on. I think all that
code gets imported from a shared AMD project.
>
> On 18/08/18 00:32, Kai Wasserbäch wrote:
>> Only used, when asserts are enabled.
>>
>> Fixes an unused-variable warning with gcc-8:
>> ../../../src/compiler/nir/nir_opt_if.c: In function
>> 'opt_peel_loop_initial_if':
>> ../../../src/compiler/nir/nir_opt_if.c:109:15: warning: unused
>> variable 'prev_block' [-Wunused-variable]
>> nir_block *prev_block =
>> ^~~~~~~~~~
>>
>> Signed-off-by: Kai Wasserbäch <kai at dev.carbon-project.org>
>> ---
>> src/compiler/nir/nir_opt_if.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/compiler/nir/nir_opt_if.c
>> b/src/compiler/nir/nir_opt_if.c
>> index b3d0bf1dec..dacf2d6c66 100644
>> --- a/src/compiler/nir/nir_opt_if.c
>> +++ b/src/compiler/nir/nir_opt_if.c
>> @@ -106,7 +106,7 @@ static bool
>> opt_peel_loop_initial_if(nir_loop *loop)
>> {
>> nir_block *header_block = nir_loop_first_block(loop);
>> - nir_block *prev_block =
>> + MAYBE_UNUSED nir_block *prev_block =
>> nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node));
>> /* It would be insane if this were not true */
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list