qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/6] Implement constant folding and copy propaga


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 0/6] Implement constant folding and copy propagation in TCG
Date: Sat, 21 May 2011 01:31:31 +0200

Am 20.05.2011 um 21:37 schrieb Aurelien Jarno:

On Fri, May 20, 2011 at 10:50:49AM -0700, Richard Henderson wrote:
On 05/20/2011 05:39 AM, 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.

I totally agree that this sort of optimization is needed in TCG.

I basically stopped working on constant propagation, as while the TCG
code looked nicer, the resulting code was always slower.

Has anyone evaluated reusing LLVM optimization passes for TCG? Or maybe GIMPL if there's an equivalent?

Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]