From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH 2.3 0/8] Linked list for tcg ops
Date: Tue, 11 Nov 2014 17:24:44 +0100 [thread overview]
Message-ID: <1415723092-4088-1-git-send-email-rth@twiddle.net> (raw)
Currently tcg ops are simply placed in a buffer in order. Which is
fine until we want to actually do something with the opcode stream,
such as optimize them. Note the horrible things like call opcodes
needing their argument count both prefixed and postfixed so that we
can iterate across the call either forward or backward.
While I'm changing this, I also move quite a lot of tcg-op.h out of
line. There is very little benefit to having most of them be inline,
since their arguments are extracted from the guest instructions being
translated, and thus their values are not really predictable.
I chose a cutoff of one function call. If a tcg-op.h functionconsists
of a single function call, inline it, otherwise move it out of line.
This also removes a bit of boilerplate from each target.
I haven't been able to measure a performance difference with this
patch set. I wouldn't really expect any, as the complexity level
remains the same. I simply find the link list significantly more
maintainable.
Of course this isn't intended for the upcoming 2.2 release.
Comments?
r~
Richard Henderson (8):
tcg: Move some opcode generation functions out of line
tcg: Reduce ifdefs in tcg-op.c
tcg: Move emit of INDEX_op_end into gen_tb_end
tcg: Introduce tcg_op_buf_count and tcg_op_buf_full
tcg: Put opcodes in a linked list
tcg: Remove opcodes instead of noping them out
tcg: Implement insert_op_before
tcg: Remove unused opcodes
Makefile.target | 2 +-
include/exec/gen-icount.h | 22 +-
target-alpha/translate.c | 16 +-
target-arm/translate-a64.c | 10 +-
target-arm/translate.c | 10 +-
target-cris/translate.c | 15 +-
target-i386/translate.c | 11 +-
target-lm32/translate.c | 16 +-
target-m68k/translate.c | 10 +-
target-microblaze/translate.c | 22 +-
target-mips/translate.c | 10 +-
target-moxie/translate.c | 10 +-
target-openrisc/translate.c | 15 +-
target-ppc/translate.c | 11 +-
target-s390x/translate.c | 11 +-
target-sh4/translate.c | 10 +-
target-sparc/translate.c | 10 +-
target-tricore/translate.c | 5 +-
target-unicore32/translate.c | 10 +-
target-xtensa/translate.c | 8 +-
tcg/optimize.c | 307 +++--
tcg/tcg-op.c | 1941 ++++++++++++++++++++++++++++++++
tcg/tcg-op.h | 2488 ++++++-----------------------------------
tcg/tcg-opc.h | 9 -
tcg/tcg.c | 535 +++------
tcg/tcg.h | 72 +-
tci.c | 13 -
27 files changed, 2761 insertions(+), 2838 deletions(-)
create mode 100644 tcg/tcg-op.c
--
1.9.3
next reply other threads:[~2014-11-11 16:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 16:24 Richard Henderson [this message]
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 1/8] tcg: Move some opcode generation functions out of line Richard Henderson
2014-11-14 18:01 ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 2/8] tcg: Reduce ifdefs in tcg-op.c Richard Henderson
2014-11-14 18:20 ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 3/8] tcg: Move emit of INDEX_op_end into gen_tb_end Richard Henderson
2014-11-13 15:57 ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 4/8] tcg: Introduce tcg_op_buf_count and tcg_op_buf_full Richard Henderson
2014-11-13 16:13 ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 5/8] tcg: Put opcodes in a linked list Richard Henderson
2014-11-14 15:03 ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 6/8] tcg: Remove opcodes instead of noping them out Richard Henderson
2014-11-14 15:08 ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 7/8] tcg: Implement insert_op_before Richard Henderson
2014-11-14 15:25 ` Bastian Koppelmann
2014-11-14 14:46 ` Richard Henderson
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 8/8] tcg: Remove unused opcodes Richard Henderson
2014-11-14 15:31 ` Bastian Koppelmann
2014-11-14 14:47 ` Richard Henderson
2014-11-14 18:22 ` [Qemu-devel] [PATCH 2.3 0/8] Linked list for tcg ops Bastian Koppelmann
2015-01-03 8:46 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415723092-4088-1-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).