From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, aurelien@aurel32.net
Subject: [Qemu-devel] [RFC 00/16] TCG indirect registers
Date: Thu, 19 Sep 2013 14:24:52 -0700 [thread overview]
Message-ID: <1379625908-27964-1-git-send-email-rth@twiddle.net> (raw)
This is an attempt to improve performance of target-sparc
by exposing the windowed registers as TCG globals, and all
the optimization that we can do there.
This is done via allowing tcg_global_mem_new to be used
with any base pointer, not just off of a fixed register.
Thus the sparc windowed registers are globals off cpu_regwptr.
In the process of working through this, I attempt to remove
as many uses of "int" as I can throughout the TCG code gen
paths, replacing them with TCGReg when we're talking about
hard registers, and TCGTemp pointers when we're talking about
temporaries. This, IMO, reduces confusion as to what kind of
"int" we mean at any given time.
By the time we get to patch 14, actually implementing the
indirect temps, it's fairly easy to recurse in order to
load the base pointer when we need to load or store an
indirect temp.
I've not yet tried to measure the performance. As far as
testing, linux-user-0.3 and sparc-test-0.2 works. I've
scanned some of the dumps from those. In the cases where
no real optimization was possible, we generate practically
the same code -- usually with different registers selected.
In the cases where we can optimize, I've seen some TB's
cut in half.
Anyway, I wanted some feedback before I take this any further.
r~
Richard Henderson (16):
tcg: Change tcg_global_mem_new_* to take a TCGv_ptr
tcg: Introduce TCGTempType
tcg: Change ts->mem_reg to ts->mem_base
tcg: Compress TCGLabelQemuLdst
tcg: More use of TCGReg where appropriate
tcg: Remove tcg_get_arg_str_i32/64
tcg: Change reg_to_temp to TCGTemp pointer
tcg: Change temp_dead argument to TCGTemp
tcg: Change temp_sync argument to TCGTemp
tcg: Change temp_save argument to TCGTemp
tcg: Introduce temp_load
tcg: Tidy temporary allocation
tcg: Use temp_idx
tcg: Implement indirect memory registers
target-sparc: Tidy global register initialization
target-sparc: Use global registers for the register window
target-alpha/translate.c | 40 +--
target-arm/translate.c | 20 +-
target-cris/translate.c | 24 +-
target-cris/translate_v10.c | 82 +++---
target-i386/translate.c | 56 ++--
target-lm32/translate.c | 24 +-
target-m68k/translate.c | 28 +-
target-microblaze/translate.c | 14 +-
target-mips/translate.c | 25 +-
target-moxie/translate.c | 8 +-
target-openrisc/translate.c | 26 +-
target-ppc/translate.c | 40 +--
target-s390x/translate.c | 16 +-
target-sh4/translate.c | 36 +--
target-sparc/translate.c | 195 ++++++-------
target-unicore32/translate.c | 2 +-
target-xtensa/translate.c | 10 +-
tcg/tcg.c | 641 +++++++++++++++++++++---------------------
tcg/tcg.h | 78 +++--
19 files changed, 693 insertions(+), 672 deletions(-)
--
1.8.1.4
next reply other threads:[~2013-09-19 21:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 21:24 Richard Henderson [this message]
2013-09-19 21:24 ` [Qemu-devel] [RFC 01/16] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 02/16] tcg: Introduce TCGTempType Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 03/16] tcg: Change ts->mem_reg to ts->mem_base Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 04/16] tcg: Compress TCGLabelQemuLdst Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 05/16] tcg: More use of TCGReg where appropriate Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 06/16] tcg: Remove tcg_get_arg_str_i32/64 Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 07/16] tcg: Change reg_to_temp to TCGTemp pointer Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 08/16] tcg: Change temp_dead argument to TCGTemp Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 09/16] tcg: Change temp_sync " Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 10/16] tcg: Change temp_save " Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 11/16] tcg: Introduce temp_load Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 12/16] tcg: Tidy temporary allocation Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 13/16] tcg: Use temp_idx Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 14/16] tcg: Implement indirect memory registers Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 15/16] target-sparc: Tidy global register initialization Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 16/16] target-sparc: Use global registers for the register window Richard Henderson
2013-09-22 17:28 ` [Qemu-devel] [RFC 00/16] TCG indirect registers Max Filippov
2013-09-23 17:23 ` Blue Swirl
2013-09-23 18:06 ` Richard Henderson
2013-09-24 13:32 ` Artyom Tarasenko
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=1379625908-27964-1-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--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).