Re: div_u64/do_div stack size usage, was Re: [v3] block: Removed a warning while compiling with a cross compiler for parisc

From: John David Anglin
Date: Wed Jul 07 2021 - 10:42:55 EST


On 2021-07-07 4:17 a.m., Arnd Bergmann wrote:
> I have also tried it with the other gcc versions and shown that it
> happens with every older compiler as well, but it does not happen
> with gcc-10 or gcc-11, which bring the frame size down to 164 or
> 172 bytes respectively. gcc-10 also fixes similar warnings for
> net/ipv4/tcp_input.c, net/sunrpc/stats.c and lib/xxhash.c that
> fly under the radar with the default warning level.
>
> My first thought was this was a result of -finline-functions getting
> enabled by default in gcc-10, but enabling it on gcc-9 did not
> help here. It's likely that the gcc behavior was fixed in the process
> of enabling the more aggressive inliner by default though.
A number of improvements were made to the calculation of RTX costs in gcc-10 and gcc-11.
These dramatically affect inlining and the compilation time for xxhash.c on parisc.  The problem
is pretty much fixed for the 32-bit target but more work is needed for the 64-bit target.

See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87256

Dave

--
John David Anglin dave.anglin@xxxxxxxx