[Swan-dev] pluto: ikev2_ts.c: convert large const by-value parameters to by-ref

Andrew Cagney andrew.cagney at gmail.com
Wed Jun 16 17:21:07 UTC 2021


I saw that but decided to ignore it.

On Wed, 16 Jun 2021 at 12:14, D. Hugh Redelmeier <hugh at vault.libreswan.fi>
wrote:

> New commits:
> commit a8fe696f67534be498e730c45f5337edc153ec1a
> Author: D. Hugh Redelmeier <hugh at mimosa.com>
> Date:   Wed Jun 16 12:07:33 2021 -0400
>
>     pluto: ikev2_ts.c: convert large const by-value parameters to by-ref
>
>     Coverity complains about pointlessly copying large (1k) parameters.
>     It's right.  Thank "const" for making this transformation evident.
>
>     Wishful thinking: a compiler ought to be able to do this
> transformation.
>
>
What makes you think the compiler can't eliminate this?  It is 2021 after
all.
The function's static so it doesn't even need LTO.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20210616/3f4a528b/attachment.html>


More information about the Swan-dev mailing list