[Top] [All Lists]

Re: [PATCH] MIPS: Reduce code size for MIPS32R2 platforms.

To: Ralf Baechle <>
Subject: Re: [PATCH] MIPS: Reduce code size for MIPS32R2 platforms.
From: "Steven J. Hill" <>
Date: Thu, 27 Jun 2013 11:10:09 -0500
Cc: <>
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <> <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6
On 06/27/2013 10:58 AM, Ralf Baechle wrote:
On Fri, Dec 07, 2012 at 04:09:46PM +0100, Ralf Baechle wrote:

It's a while already - but I haven't forgotten about this little optimization.


Using a quick hack (not in below patch) I reduced CPU support to just a
single type.  Then not only code for the other 2 variants is dropped by
the compiler but also dead code elimination can discard ifs and switches
leaving a highly customized, smaller and faster kernel.  The best of it
is that it doesn't even rely on LTO, just a decent optimizer of a per-file
compiler.  Patch for your enjoyment below.

I've done my testing with plain old boring gcc 4.7 btw.

Much appreciated. I will test it out here and get back to you. Thanks.


<Prev in Thread] Current Thread [Next in Thread>