Received: from eggs.gnu.org ([140.186.70.92]:38327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNlbe-0001r0-1y for qemu-devel@nongnu.org; Sat, 21 May 2011 08:48:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNlbd-00020p-0R for qemu-devel@nongnu.org; Sat, 21 May 2011 08:48:34 -0400 Received: from hall.aurel32.net ([88.191.126.93]:37280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNlbc-00020l-Pr for qemu-devel@nongnu.org; Sat, 21 May 2011 08:48:32 -0400 Date: Sat, 21 May 2011 14:48:30 +0200 From: Aurelien Jarno Message-ID: <20110521124830.GE27045@hall.aurel32.net> References: <20110520193508.GB27170@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20110520193508.GB27170@hall.aurel32.net> Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 0/6] Implement constant folding and copy propagation in TCG List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Batuzov Cc: mj.mccormack@samsung.com, qemu-devel@nongnu.org, zhur@ispras.ru On Fri, May 20, 2011 at 09:35:08PM +0200, Aurelien Jarno wrote: > On Fri, May 20, 2011 at 04:39:27PM +0400, Kirill Batuzov wrote: > > This series implements some basic machine-independent optimizations. They > > simplify code and allow liveness analysis do it's work better. > > > > Suppose we have following ARM code: > > > > movw r12, #0xb6db > > movt r12, #0xdb6d > > > > In TCG before optimizations we'll have: > > > > movi_i32 tmp8,$0xb6db > > mov_i32 r12,tmp8 > > mov_i32 tmp8,r12 > > ext16u_i32 tmp8,tmp8 > > movi_i32 tmp9,$0xdb6d0000 > > or_i32 tmp8,tmp8,tmp9 > > mov_i32 r12,tmp8 > > > > And after optimizations we'll have this: > > > > movi_i32 r12,$0xdb6db6db > > > > Here are performance evaluation results on SPEC CPU2000 integer tests in > > user-mode emulation on x86_64 host. There were 5 runs of each test on > > reference data set. The tables below show runtime in seconds for all these > > runs. > > How are the tests done? Are they done with linux-user, or running the > executables in qemu-system-xxx? > Another point I forgot, the current TCG code already does a very simple copy and constant propagation, so it might be a good idea to end the series with cleanup this code. There is no point in doing such optimisation twice, and it is most probably taking a non negligible time. This way you can provide benchmarks on the whole set. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net