[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d75712c5-63a1-896f-7750-0e4f28c77127@linux-m68k.org>
Date: Mon, 16 Jun 2025 14:48:32 +1000 (AEST)
From: Finn Thain <fthain@...ux-m68k.org>
To: Daniel Palmer <daniel@...f.com>
cc: geert@...ux-m68k.org, linux-m68k@...ts.linux-m68k.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68k: Enable dead code elimination
On Wed, 16 Apr 2025, Daniel Palmer wrote:
> Allow the experimental dead code elimination config to be enabled.
>
> For my 68000 nommu config this frees up a few hundred K of memory
> so seems worth while.
>
> Boot and build tested on nommu and mmu enabled configs.
>
> Before:
> Memory: 5388K/8192K available (1986K kernel code, 114K rwdata,
> 244K rodata, 92K init, 41K bss, 2624K reserved, 0K cma-reserved)
>
> After
> Memory: 5684K/8192K available (1714K kernel code, 112K rwdata,
> 228K rodata, 92K init, 37K bss, 2328K reserved, 0K cma-reserved)
>
> Signed-off-by: Daniel Palmer <daniel@...f.com>
With gcc-13.3, enabling DCE here recovered 0.5 MB of memory. Very nice! I
saw no regressions in basic functionality. I tested on Aranym, Qemu and
Quadra 605, including module load & unload.
Tested-by: Finn Thain <fthain@...ux-m68k.org>
> ---
> arch/m68k/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
> index eb5bb6d36899..11835eb59d94 100644
> --- a/arch/m68k/Kconfig
> +++ b/arch/m68k/Kconfig
> @@ -32,6 +32,7 @@ config M68K
> select HAVE_ASM_MODVERSIONS
> select HAVE_DEBUG_BUGVERBOSE
> select HAVE_EFFICIENT_UNALIGNED_ACCESS if !CPU_HAS_NO_UNALIGNED
> + select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
> select HAVE_MOD_ARCH_SPECIFIC
> select HAVE_UID16
> select MMU_GATHER_NO_RANGE if MMU
>
Powered by blists - more mailing lists