auto remove unused function arguments from call chain
Johan Engelen
j at j.nl
Sat Nov 16 11:25:35 UTC 2019
On Saturday, 16 November 2019 at 04:22:17 UTC, Newbie2019 wrote:
>
> when build without version DEV_DEBUG, the file and line is
> never used. will ldc able to auto remove it from the binary
> code ?
In general, no. Because the function signature must be obeyed
such that the function can be called from anywhere without
knowing the optimizations inside of it.
If the function is internal to a module and the function is not
exported, then yes the optimization is perhaps legal. So LTO
might be allowed (and able) to do it, but I don't know.
-Johan
More information about the digitalmars-d-ldc
mailing list