linux-mips
[Top] [All Lists]

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

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] MIPS: Reduce code size for MIPS32R2 platforms.
From: "Steven J. Hill" <Steven.Hill@imgtec.com>
Date: Thu, 27 Jun 2013 11:10:09 -0500
Cc: <linux-mips@linux-mips.org>
In-reply-to: <20130627155816.GF10727@linux-mips.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1354857289-28828-1-git-send-email-sjhill@mips.com> <20121207150946.GA27226@linux-mips.org> <20130627155816.GF10727@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
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.

Steve



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