qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 00/16] TCG indirect registers
@ 2013-09-19 21:24 Richard Henderson
  2013-09-19 21:24 ` [Qemu-devel] [RFC 01/16] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr Richard Henderson
                   ` (17 more replies)
  0 siblings, 18 replies; 21+ messages in thread
From: Richard Henderson @ 2013-09-19 21:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel, aurelien

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-09-24 13:32 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-19 21:24 [Qemu-devel] [RFC 00/16] TCG indirect registers Richard Henderson
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

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).