qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/5] optimize various tcg_gen() functions using extract op
@ 2017-05-12  3:35 Philippe Mathieu-Daudé
  2017-05-12  3:35 ` [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract() Philippe Mathieu-Daudé
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-05-12  3:35 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, qemu-ppc, Richard Henderson, Alexander Graf,
	Artyom Tarasenko, Aurelien Jarno, David Gibson, Eduardo Habkost,
	Eric Blake, Laurent Vivier, Laurent Vivier, Mark Cave-Ayland,
	Markus Armbruster, Michael Tokarev, Nikunj A Dadhania,
	Paolo Bonzini, Peter Maydell
  Cc: Philippe Mathieu-Daudé, Markus Elfring, Julia Lawall,
	Nicolas Palix

Changes from v1:

In my first attempt I misunderstood tcg_gen_extract() intrinsics, and Richard
Henderson pointed that out.
In this patchset the cocci script is corrected and clarified, it also print how
arguments are checked while running.
Also:
- incorrect patches have been removed. (Richard Henderson, Nikunj A Dadhania)
- Coccinelle script licensed GPLv2+ (Eric Blake)
- comment in each commit about how to apply the patch (Eric Blake)
- added Acked-by for m68k (Laurent Vivier)
- Cc: Coccinelle developers.

[v1]

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é (5):
  coccinelle: add a script to optimize tcg op using tcg_gen_extract()
  target/arm: optimize rev16() using extract op
  target/m68k: optimize bcd_flags() 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 | 69 ++++++++++++++++++++++++++++++++
 target/arm/translate-a64.c               |  6 +--
 target/m68k/translate.c                  |  3 +-
 target/ppc/translate.c                   |  9 ++---
 target/ppc/translate/vsx-impl.inc.c      | 15 +++----
 target/sparc/translate.c                 | 15 +++----
 6 files changed, 85 insertions(+), 32 deletions(-)
 create mode 100644 scripts/coccinelle/tcg_gen_extract.cocci

-- 
2.11.0

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

end of thread, other threads:[~2017-05-12 23:51 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12  3:35 [Qemu-devel] [PATCH v3 0/5] optimize various tcg_gen() functions using extract op Philippe Mathieu-Daudé
2017-05-12  3:35 ` [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract() Philippe Mathieu-Daudé
2017-05-12  3:41   ` Julia Lawall
2017-05-12  5:36     ` Philippe Mathieu-Daudé
2017-05-12  7:16       ` Julia Lawall
2017-05-12  7:39         ` SF Markus Elfring
2017-05-12 17:49       ` Eric Blake
2017-05-12  5:48   ` SF Markus Elfring
2017-05-12 11:00   ` SF Markus Elfring
2017-05-12  3:35 ` [Qemu-devel] [PATCH v3 2/5] target/arm: optimize rev16() using extract op Philippe Mathieu-Daudé
2017-05-12 16:50   ` Richard Henderson
2017-05-12 18:21     ` Aurelien Jarno
2017-05-12 19:05       ` Richard Henderson
2017-05-12 19:22         ` Aurelien Jarno
2017-05-12 19:38           ` Richard Henderson
2017-05-12 23:50     ` Philippe Mathieu-Daudé
2017-05-12  3:35 ` [Qemu-devel] [PATCH v3 3/5] target/m68k: optimize bcd_flags() " Philippe Mathieu-Daudé
2017-05-12  3:35 ` [Qemu-devel] [PATCH v3 4/5] target/ppc: using various functions " Philippe Mathieu-Daudé
2017-05-12 23:48   ` Philippe Mathieu-Daudé
2017-05-12  3:35 ` [Qemu-devel] [PATCH v3 5/5] target/sparc: optimize " Philippe Mathieu-Daudé
2017-05-12 23:49   ` 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).