[PATCH] RISC-V: Enable dead code elimination
Conor Dooley
conor at kernel.org
Mon Feb 13 11:39:50 PST 2023
On Tue, Feb 14, 2023 at 01:39:06AM +0800, Falcon wrote:
> Select CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION for RISC-V, allowing
> the user to enable dead code elimination. In order for this to work,
> ensure that we keep the alternative table by annotating them with KEEP.
>
> This boots well on qemu with both rv32_defconfig & rv64 defconfig, but
> it only shrinks their builds by ~1%, a smaller config is thereforce
> customized to test this feature:
>
> | rv32 | rv64
> --------|------------------------|---------------------
> No DCE | 4460684 | 4893488
> DCE | 3986716 | 4376400
> Shrink | 473968 (~10.6%) | 517088 (~10.5%)
>
> The config used above only reserves necessary options to boot on qemu
> with serial console, more like the size-critical embedded scenes:
>
> - rv64 config: https://pastebin.com/crz82T0s
> - rv32 config: rv64 config + 32-bit.config
>
> Signed-off-by: Falcon <falcon at tinylab.org>
I feel like I "need" to ask - is Falcon your actual name?
Sorry,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20230213/23879cf7/attachment.sig>
More information about the linux-riscv
mailing list