From: Nathan Bossart <nathandbossart@gmail.com>
To: Ankit Kumar Pandey <itsankitkp@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: optimize several list functions with SIMD intrinsics
Date: Wed, 15 Mar 2023 09:23:19 -0700
Message-ID: <20230315162319.GA609684@nathanxps13> (raw)
In-Reply-To: <7fc23473-7f10-5282-711e-34247d089f75@gmail.com>
References: <20230308002502.GA3378449@nathanxps13>
<20230308185809.GA3552675@nathanxps13>
<167852767890.628976.10354523915450248589.pgcf@coridan.postgresql.org>
<20230313214027.GB423713@nathanxps13>
<7fc23473-7f10-5282-711e-34247d089f75@gmail.com>
On Wed, Mar 15, 2023 at 07:31:46PM +0530, Ankit Kumar Pandey wrote:
>> On 14/03/23 03:10, Nathan Bossart wrote:
>> On Sat, Mar 11, 2023 at 09:41:18AM +0000, Ankit Kumar Pandey wrote:
>> > 1. In list_member_ptr, will it be okay to bring `const ListCell
>> > *cell` from #ifdef USE_NO_SIMD
>> > const ListCell *cell;
>> > #endif
>> > to #else like as mentioned below? This will make visual separation between #if cases more cleaner
>> I would expect to see -Wdeclaration-after-statement warnings if we did
>> this.
>
> This worked fine for me, no warnings on gcc 12.2.0. Not a concern though.
Did you try building without SIMD support? This is what I see:
list.c: In function ‘list_member_ptr’:
list.c:697:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
697 | const ListCell *cell;
| ^~~~~
If your build doesn't have USE_NO_SIMD defined, this warning won't appear
because the code in question will be compiled out.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, itsankitkp@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: optimize several list functions with SIMD intrinsics
In-Reply-To: <20230315162319.GA609684@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox