Received: from eggs.gnu.org ([208.118.235.92]:57835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPUiy-0007kR-5D for qemu-devel@nongnu.org; Tue, 09 Apr 2013 05:20:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPUiv-0002v8-8g for qemu-devel@nongnu.org; Tue, 09 Apr 2013 05:20:20 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:28731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPUiu-0002uu-NC for qemu-devel@nongnu.org; Tue, 09 Apr 2013 05:20:17 -0400 Date: Tue, 9 Apr 2013 17:20:04 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20130409092004.GA88144@cs.nctu.edu.tw> References: <1365479139-18737-1-git-send-email-lig.fnst@cn.fujitsu.com> <20130409080529.GA86334@cs.nctu.edu.tw> <5163CD39.9000007@redhat.com> <1365495670.9553.59.camel@liguang.fnst.cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1365495670.9553.59.camel@liguang.fnst.cn.fujitsu.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] translate: optimize gen_intermediate_code_internal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: li guang Cc: peter.maydell@linaro.org, =?utf-8?B?IumZs+mfi+S7uyAoV2VpLVJlbiBDaGVuKSI=?= , e.voevodin@samsung.com, proljc@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, paul@codesourcery.com, Paolo Bonzini , afaerber@suse.de, aurelien@aurel32.net, rth@twiddle.net Hi liguang, On Tue, Apr 09, 2013 at 04:21:10PM +0800, li guang wrote: > =E5=9C=A8 2013-04-09=E4=BA=8C=E7=9A=84 10:11 +0200=EF=BC=8CPaolo Bonzin= i=E5=86=99=E9=81=93=EF=BC=9A > > Il 09/04/2013 10:05, =E9=99=B3=E9=9F=8B=E4=BB=BB (Wei-Ren Chen) ha sc= ritto: > > > Hi liguang, > > >=20 > > > Just to be curious, how much performance improvement this patch c= an get? > >=20 > > I think zero. It is indeed making the code a tiny bit more readable = in > > the 2nd/3rd/5th/6th hunks. >=20 > I think maybe a little greater than 0, > for it optimizes a variable 'lj' increment. As Peter said, only profiling can show if there is a performance improvement. > > But the 1st and 4th hunks, which do > >=20 > > - num_insns =3D 0; > >=20 > > are wrong. I'm surprised the compiler doesn't report usage of an > > uninitialized variable. liguang, how did you test them? >=20 > I do normal compile and run guest OS for TCG, > I think 'max_insns =3D tb->cflags & CF_COUNT_MASK;' is enough > to feed compiler. num_insns and max_insns are two different variables, right? So this assignment does not do anything with num_insns. Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj