qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Filip Navara <filip.navara@gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Nigel Horne <njh@bandsman.co.uk>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Arm emulation tweak
Date: Wed, 19 Aug 2009 11:46:11 +0200	[thread overview]
Message-ID: <5b31733c0908190246h3385623fid8183b7e8e67500a@mail.gmail.com> (raw)
In-Reply-To: <20090818161424.GA1435@shareable.org>

On Tue, Aug 18, 2009 at 6:14 PM, Jamie Lokier<jamie@shareable.org> wrote:
> Nigel Horne wrote:
>> This small patch reduces (on my machine) the call to new_tmp by 16
>> bytes, which may not sound much, but it's called so often that it makes
>> a nice speed up of Arm emulation:
>
>>      if (GET_TCGV_I32(temps[num_temps]))
>>        return temps[num_temps++];
>>
>> !     tmp = tcg_temp_new_i32();
>> !     temps[num_temps++] = tmp;
>> !     return tmp;
>>  }
>
> becomes
>
>>      if (GET_TCGV_I32(temps[num_temps]))
>>        return temps[num_temps++];
>>
>> !     return temps[num_temps++] = tcg_temp_new_i32();
>>  }
>
> That's pretty tragic if GCC fails to compile them to identical code,
> assuming you had optimisation turned on.
>
> Have you tried building with -Os, -O2 etc. to see if that makes a
> difference?
>
> Which GCC version are you using?
>
> -- Jamie
>

BTW, I have even better optimizations for this code at
git://repo.or.cz/qemu/navara.git. These functions are no longer needed
in the form as they appear in the source code today, since TCG has
evolved.

F.

  reply	other threads:[~2009-08-19  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 15:57 [Qemu-devel] Arm emulation tweak Nigel Horne
2009-08-18 16:14 ` Jamie Lokier
2009-08-19  9:46   ` Filip Navara [this message]
2009-08-19 10:12     ` Nigel Horne
2009-08-19 10:38       ` Filip Navara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b31733c0908190246h3385623fid8183b7e8e67500a@mail.gmail.com \
    --to=filip.navara@gmail.com \
    --cc=jamie@shareable.org \
    --cc=njh@bandsman.co.uk \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).