Skip to content

tcg cleanup and optimization

Richard Henderson qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10tcg: Optimize brcond2 and setcond2 ne/eqtcg/optimize.c+94 -00 replies
2/10tcg: Invert the inclusion of helper.hinclude/exec/helper-gen.h include/exec/helper-head.h include/exec/helper-proto.h +96 more+264 -3251 reply
3/10tcg: Push tcg-runtime routines into exec/helper-*include/exec/helper-gen.h include/exec/helper-head.h include/exec/helper-proto.h +6 more+67 -712 replies
4/10tcg: Use helper-gen.h in tcg-op.htcg/tcg-op.h+25 -1502 replies
5/10tcg: Inline tcg_gen_helperNinclude/exec/helper-gen.h tcg/tcg-op.h+6 -131 reply
6/10tcg: Move side effects out of dh_sizemaskinclude/exec/helper-gen.h include/exec/helper-head.h+8 -150 replies
7/10tcg: Register the helper info struct rather than the nametcg/tcg.c+5 -21 reply
8/10tcg: Save flags and computed sizemask in TCGHelperInfoinclude/exec/helper-tcg.h tcg/tcg.c+35 -162 replies
9/10tcg: Remove sizemask and flags arguments to tcg_gen_callNinclude/exec/helper-gen.h include/exec/helper-head.h tcg/tcg.c +1 more+16 -260 replies
10/10tcg: Move size effects out of dh_arginclude/exec/helper-gen.h include/exec/helper-head.h+39 -501 reply

Reviews trailers per patch

5 of 10 patches have a Reviewed-by or Acked-by.

PatchAlex Bennée
1/10
2/10R-b
3/10R-b
4/10
5/10R-b
6/10
7/10R-b
8/10
9/10
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/10] tcg cleanup and optimization

Two unrelated changes here, but the first consists of only one patch and I'm too lazy to do two patch sets.

The first change improves code for 64-bit guests on 32-bit hosts. If we can prove that one half of a 64-bit comparison is constant, we can simplify to only comparing the other half. This is most common with zero-extended values such that 0:x == 0:y can be simplified to x == y.

The second change is a series of patches tidies the way helper.h is arranged. This cleanup reduces the number of files that must be recompiled when the old def-helper.h needed to be changed. In the process, it moves some data from arguments to tcg_callN into const static data within tcg.c. This change is a pre-requisite to being able to use libffi in the interpreter, but I think the cleanups are nice enough to justify separate inclusion.

r~

Richard Henderson (10):
tcg: Optimize brcond2 and setcond2 ne/eq
tcg: Invert the inclusion of helper.h
tcg: Push tcg-runtime routines into exec/helper-*
tcg: Use helper-gen.h in tcg-op.h
tcg: Inline tcg_gen_helperN
tcg: Move side effects out of dh_sizemask
tcg: Register the helper info struct rather than the name
tcg: Save flags and computed sizemask in TCGHelperInfo
tcg: Remove sizemask and flags arguments to tcg_gen_callN
tcg: Move size effects out of dh_arg

 include/exec/def-helper.h          | 274 -------------------------------------
 include/exec/helper-gen.h          |  70 ++++++++++
 include/exec/helper-head.h         | 134 ++++++++++++++++++
 include/exec/helper-proto.h        |  39 ++++++
 include/exec/helper-tcg.h          |  48 +++++++
 target-alpha/fpu_helper.c          |   2 +-
 target-alpha/helper.c              |   2 +-
 target-alpha/helper.h              |   4 -
 target-alpha/int_helper.c          |   2 +-
 target-alpha/mem_helper.c          |   2 +-
 target-alpha/sys_helper.c          |   2 +-
 target-alpha/translate.c           |   5 +-
 target-arm/crypto_helper.c         |   2 +-
 target-arm/helper-a64.c            |   2 +-
 target-arm/helper.c                |   2 +-
 target-arm/helper.h                |   4 -
 target-arm/iwmmxt_helper.c         |   2 +-
 target-arm/neon_helper.c           |   2 +-
 target-arm/op_helper.c             |   2 +-
 target-arm/translate-a64.c         |   5 +-
 target-arm/translate.c             |   5 +-
 target-cris/helper.h               |   4 -
 target-cris/op_helper.c            |   2 +-
 target-cris/translate.c            |   5 +-
 target-i386/cc_helper.c            |   2 +-
 target-i386/excp_helper.c          |   2 +-
 target-i386/fpu_helper.c           |   2 +-
 target-i386/helper.h               |   4 -
 target-i386/int_helper.c           |   2 +-
 target-i386/mem_helper.c           |   2 +-
 target-i386/misc_helper.c          |   2 +-
 target-i386/seg_helper.c           |   2 +-
 target-i386/smm_helper.c           |   2 +-
 target-i386/svm_helper.c           |   2 +-
 target-i386/translate.c            |   5 +-
 target-lm32/helper.h               |   4 -
 target-lm32/op_helper.c            |   2 +-
 target-lm32/translate.c            |   5 +-
 target-m68k/helper.c               |   2 +-
 target-m68k/helper.h               |   4 -
 target-m68k/op_helper.c            |   2 +-
 target-m68k/translate.c            |   5 +-
 target-microblaze/helper.h         |   4 -
 target-microblaze/op_helper.c      |   2 +-
 target-microblaze/translate.c      |   6 +-
 target-mips/dsp_helper.c           |   2 +-
 target-mips/helper.h               |   6 -
 target-mips/lmi_helper.c           |   2 +-
 target-mips/op_helper.c            |   2 +-
 target-mips/translate.c            |   5 +-
 target-moxie/helper.c              |   2 +-
 target-moxie/helper.h              |   4 -
 target-moxie/translate.c           |   5 +-
 target-openrisc/exception_helper.c |   2 +-
 target-openrisc/fpu_helper.c       |   2 +-
 target-openrisc/helper.h           |   4 -
 target-openrisc/int_helper.c       |   2 +-
 target-openrisc/interrupt_helper.c |   2 +-
 target-openrisc/sys_helper.c       |   2 +-
 target-openrisc/translate.c        |   5 +-
 target-ppc/excp_helper.c           |   2 +-
 target-ppc/fpu_helper.c            |   2 +-
 target-ppc/helper.h                |   4 -
 target-ppc/int_helper.c            |   2 +-
 target-ppc/mem_helper.c            |   2 +-
 target-ppc/misc_helper.c           |   2 +-
 target-ppc/mmu-hash32.c            |   2 +-
 target-ppc/mmu-hash64.c            |   2 +-
 target-ppc/mmu_helper.c            |   2 +-
 target-ppc/timebase_helper.c       |   2 +-
 target-ppc/translate.c             |   5 +-
 target-s390x/cc_helper.c           |   2 +-
 target-s390x/fpu_helper.c          |   2 +-
 target-s390x/helper.h              |   4 -
 target-s390x/int_helper.c          |   2 +-
 target-s390x/mem_helper.c          |   2 +-
 target-s390x/misc_helper.c         |   2 +-
 target-s390x/translate.c           |   5 +-
 target-sh4/helper.h                |   4 -
 target-sh4/op_helper.c             |   2 +-
 target-sh4/translate.c             |   5 +-
 target-sparc/cc_helper.c           |   2 +-
 target-sparc/fop_helper.c          |   2 +-
 target-sparc/helper.c              |   2 +-
 target-sparc/helper.h              |   4 -
 target-sparc/int64_helper.c        |   2 +-
 target-sparc/ldst_helper.c         |   2 +-
 target-sparc/translate.c           |   5 +-
 target-sparc/vis_helper.c          |   2 +-
 target-sparc/win_helper.c          |   2 +-
 target-unicore32/helper.c          |   2 +-
 target-unicore32/helper.h          |   3 -
 target-unicore32/op_helper.c       |   2 +-
 target-unicore32/translate.c       |   5 +-
 target-unicore32/ucf64_helper.c    |   2 +-
 target-xtensa/helper.h             |   4 -
 target-xtensa/op_helper.c          |   2 +-
 target-xtensa/translate.c          |   5 +-
 target-xtensa/xtensa-semi.c        |   2 +-
 tcg-runtime.c                      |  40 ++++--
 tcg/optimize.c                     |  94 +++++++++++++
 tcg/tcg-op.h                       | 169 +++--------------------
 tcg/tcg-runtime.h                  |  30 ++--
 tcg/tcg.c                          |  50 +++----
 tcg/tcg.h                          |   6 +-
 105 files changed, 559 insertions(+), 668 deletions(-)
 delete mode 100644 include/exec/def-helper.h
 create mode 100644 include/exec/helper-gen.h
 create mode 100644 include/exec/helper-head.h
 create mode 100644 include/exec/helper-proto.h
 create mode 100644 include/exec/helper-tcg.h
Signature · 1 line
1.9.0