[Top][All Lists]

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

[Qemu-devel] [RFC 00/16] TCG indirect registers

From: Richard Henderson
Subject: [Qemu-devel] [RFC 00/16] TCG indirect registers
Date: Thu, 19 Sep 2013 14:24:52 -0700

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.


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


reply via email to

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