MIPS: Enable dead code elimination
authorPaul Burton <paul.burton@mips.com>
Wed, 21 Nov 2018 21:56:36 +0000 (21:56 +0000)
committerPaul Burton <paul.burton@mips.com>
Wed, 21 Nov 2018 23:36:49 +0000 (15:36 -0800)
commitc0436b503591f927f326457a588c461881260276
tree805fdef33156e14df943d5bfad3aa0deb2b43cd5
parent1feba8df94f9a866a8d407e253fd34fd98080207
MIPS: Enable dead code elimination

Select CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION for MIPS, allowing the
user to enable dead code elimination. In order for this to work, ensure
that we keep the data bus exception table & the machine list by
annotating them with KEEP.

This shrinks both 32r2el_defconfig & 64r6el_defconfig builds by ~6%, as
shown by numbers from scripts/bloat-o-meter:

          | 32r2el_defconfig | 64r6el_defconfig
  --------|------------------|------------------
   No DCE | 8919864          | 8286307
      DCE | 8338988 (-6.51%) | 7741808 (-6.57%)

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21187/
Cc: linux-mips@linux-mips.org
arch/mips/Kconfig
arch/mips/kernel/vmlinux.lds.S