RFC TCG indirect registers
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest16 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | tcg: Change tcg_global_mem_new_* to take a TCGv_ptrtarget-alpha/ target-arm/ target-cris/ +16 more | +296 | 0 replies | |
| 2/16 | tcg: Introduce TCGTempTypetcg/ | +7 | 0 replies | |
| 3/16 | tcg: Change ts->mem_reg to ts->mem_basetcg/ tcg/ | +38 | 0 replies | |
| 4/16 | tcg: Compress TCGLabelQemuLdsttcg/ | +10 | 0 replies | |
| 5/16 | tcg: More use of TCGReg where appropriatetcg/ tcg/ | +19 | 0 replies | |
| 6/16 | tcg: Remove tcg_get_arg_str_i32/64tcg/ tcg/ | +0 | 0 replies | |
| 7/16 | tcg: Change reg_to_temp to TCGTemp pointertcg/ tcg/ | +56 | 0 replies | |
| 8/16 | tcg: Change temp_dead argument to TCGTemptcg/ | +19 | 0 replies | |
| 9/16 | tcg: Change temp_sync argument to TCGTemptcg/ | +8 | 0 replies | |
| 10/16 | tcg: Change temp_save argument to TCGTemptcg/ | +7 | 0 replies | |
| 11/16 | tcg: Introduce temp_loadtcg/ | +90 | 0 replies | |
| 12/16 | tcg: Tidy temporary allocationtcg/ | +60 | 0 replies | |
| 13/16 | tcg: Use temp_idxtcg/ | +3 | 0 replies | |
| 14/16 | tcg: Implement indirect memory registerstcg/ tcg/ | +73 | 0 replies | |
| 15/16 | target-sparc: Tidy global register initializationtarget-sparc/ | +71 | 0 replies | |
| 16/16 | target-sparc: Use global registers for the register windowtarget-sparc/ | +27 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [RFC 00/16] TCG indirect registers
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(-)
Signature · 1 line
1.8.1.4