qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/8] optimize various tcg_gen() functions using extract op
@ 2017-05-10 20:05 Philippe Mathieu-Daudé
  2017-05-10 20:05 ` [Qemu-devel] [PATCH 1/8] coccinelle: add a script to optimize tcg op using tcg_gen_extract() Philippe Mathieu-Daudé
                   ` (8 more replies)
  0 siblings, 9 replies; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-05-10 20:05 UTC (permalink / raw)
  To: qemu-devel, Aurelien Jarno, Richard Henderson, Nikunj A Dadhania
  Cc: Philippe Mathieu-Daudé

While reviewing a commit from Aurelien Jarno where he optimized a TCG generator
for SH-4 [1] I found the same optimization done on PPC by Nikunj A Dadhania few
months ago [2].
After asking on the ML about a cocci script [3] I thought it would be easier to
learn about Coccinelle.

citing Aurelien Jarno:
    This doesn't change the generated code on x86, but optimizes it on most
    RISC architectures and makes the code simpler to read.

I actually applied the script using the following command:

$ docker run -v `pwd`:`pwd` -w `pwd` petersenna/coccinelle \
    --sp-file scripts/coccinelle/tcg_gen_extract.cocci \
    --macro-file scripts/cocci-macro-file.h \
    --dir target \
    --in-place

Please review, thanks.

[1] http://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg01466.html
[2] http://lists.nongnu.org/archive/html/qemu-devel/2017-02/msg05211.html
[3] http://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg01499.html

Philippe Mathieu-Daudé (8):
  coccinelle: add a script to optimize tcg op using tcg_gen_extract()
  target/arm: optimize smul_dual() and neon_trn_u8() using extract op
  target/arm: optimize rev16() using extract op
  target/cris: optimize gen_swapb() using extract op
  target/m68k: optimize bcd_flags() using extract op
  target/mips: optimize bshfl() using extract op
  target/ppc: using various functions using extract op
  target/sparc: optimize various functions using extract op

 scripts/coccinelle/tcg_gen_extract.cocci | 26 ++++++++++++++++++++++++++
 target/arm/translate-a64.c               |  6 ++----
 target/arm/translate.c                   |  6 ++----
 target/cris/translate.c                  |  3 +--
 target/m68k/translate.c                  |  3 +--
 target/mips/translate.c                  |  9 +++------
 target/ppc/translate.c                   |  9 +++------
 target/ppc/translate/vsx-impl.inc.c      | 21 +++++++--------------
 target/sparc/translate.c                 | 15 +++++----------
 9 files changed, 50 insertions(+), 48 deletions(-)
 create mode 100644 scripts/coccinelle/tcg_gen_extract.cocci

-- 
2.11.0

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2017-05-15  7:04 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-10 20:05 [Qemu-devel] [PATCH 0/8] optimize various tcg_gen() functions using extract op Philippe Mathieu-Daudé
2017-05-10 20:05 ` [Qemu-devel] [PATCH 1/8] coccinelle: add a script to optimize tcg op using tcg_gen_extract() Philippe Mathieu-Daudé
2017-05-10 20:12   ` Eric Blake
2017-05-10 20:23     ` Philippe Mathieu-Daudé
2017-05-10 20:19   ` Richard Henderson
2017-05-10 20:23     ` Eric Blake
2017-05-10 21:27     ` Philippe Mathieu-Daudé
2017-05-10 23:52     ` [Qemu-devel] [RFC PATCH v2] " Philippe Mathieu-Daudé
2017-05-11  0:13       ` Philippe Mathieu-Daudé
2017-05-11  9:03         ` Markus Armbruster
2017-05-12  2:01           ` Philippe Mathieu-Daudé
2017-05-12  2:04             ` Philippe Mathieu-Daudé
2017-05-15  7:04             ` Markus Armbruster
2017-05-10 20:05 ` [Qemu-devel] [PATCH 2/8] target/arm: optimize smul_dual() and neon_trn_u8() using extract op Philippe Mathieu-Daudé
2017-05-10 20:15   ` Eric Blake
2017-05-12  2:49     ` Philippe Mathieu-Daudé
2017-05-10 20:20   ` Richard Henderson
2017-05-10 20:32     ` Philippe Mathieu-Daudé
2017-05-12  1:31       ` Philippe Mathieu-Daudé
2017-05-10 20:05 ` [Qemu-devel] [PATCH 3/8] target/arm: optimize rev16() " Philippe Mathieu-Daudé
2017-05-12  1:54   ` Philippe Mathieu-Daudé
2017-05-10 20:05 ` [Qemu-devel] [PATCH 4/8] target/cris: optimize gen_swapb() " Philippe Mathieu-Daudé
2017-05-12  1:29   ` Philippe Mathieu-Daudé
2017-05-10 20:05 ` [Qemu-devel] [PATCH 5/8] target/m68k: optimize bcd_flags() " Philippe Mathieu-Daudé
2017-05-11  8:41   ` Laurent Vivier
2017-05-12  1:52     ` Philippe Mathieu-Daudé
2017-05-10 20:05 ` [Qemu-devel] [PATCH 6/8] target/mips: optimize bshfl() " Philippe Mathieu-Daudé
2017-05-12  2:13   ` Philippe Mathieu-Daudé
2017-05-10 20:05 ` [Qemu-devel] [PATCH 7/8] target/ppc: optimize various functions " Philippe Mathieu-Daudé
2017-05-11  0:41   ` David Gibson
2017-05-11  8:46     ` [Qemu-devel] [Qemu-ppc] " Laurent Vivier
2017-05-12  5:13       ` David Gibson
2017-05-11  4:54   ` [Qemu-devel] " Nikunj A Dadhania
2017-05-12  1:48     ` Philippe Mathieu-Daudé
2017-05-12  5:16       ` David Gibson
2017-05-10 20:05 ` [Qemu-devel] [PATCH 8/8] target/sparc: " Philippe Mathieu-Daudé
2017-05-12  1:50   ` Philippe Mathieu-Daudé
2017-05-10 20:20 ` [Qemu-devel] [PATCH 0/8] optimize various tcg_gen() " no-reply
2017-05-12  2:34   ` Philippe Mathieu-Daudé

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