Skip to content

TCG: first attempt to reduce host registers usage

Aurelien Jarno qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tcg: replace op_dead_iargs by op_dead_argstcg/tcg.c tcg/tcg.h+38 -370 replies
2/3tcg: mark dead output argument in op_dead_argstcg/tcg.c+8 -20 replies
3/3tcg: don't keep dead outputs in registerstcg/tcg.c+18 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/3] TCG: first attempt to reduce host registers usage

This patch series is a first attempt after the TCG_AREG0 discussion to show it's possible to easily (at least without making huge changes to the TCG core code) spare some registers and avoid a few spills on low register count TCG targets like i386.

On i386 hosts some TB are reduced by up to 10%, though the global TB reduction is around 0.5%. The gain is speed is only measurable in user mode with very specific benchmarks: sha1sum of 4GB files is 1.9% +/-0.2% faster. On x86-64 host, some TB are one or two bytes longer, some of them one or two bytes smaller, mainly due to different register usage, which adds or removes some REX prefixes, but overall the size is unchanged.

I have a few more ideas to further reduce register spill, I'll try to implement them in the next days/weeks.

Aurelien Jarno (3):
tcg: replace op_dead_iargs by op_dead_args
tcg: mark dead output argument in op_dead_args
tcg: don't keep dead outputs in registers

 tcg/tcg.c |  105 +++++++++++++++++++++++++++++++++++--------------------------
 tcg/tcg.h |    4 +-
 2 files changed, 62 insertions(+), 47 deletions(-)
Signature · 1 line
1.7.2.3