From: Laurent Vivier <lvivier@redhat.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, "Aurelien Jarno" <aurelien@aurel32.net>,
"Richard Henderson" <rth@twiddle.net>,
"Nikunj A Dadhania" <nikunj@linux.vnet.ibm.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Eduardo Habkost" <ehabkost@redhat.com>
Cc: Markus Elfring <elfring@users.sourceforge.net>,
Julia Lawall <julia.lawall@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>
Subject: Re: [Qemu-devel] [RFC PATCH v4 1/6] coccinelle: add a script to optimize tcg op using tcg_gen_extract()
Date: Mon, 15 May 2017 16:10:54 +0200 [thread overview]
Message-ID: <19ed7405-d072-de74-867b-c353e59bee48@redhat.com> (raw)
In-Reply-To: <27c7761e-48c8-9398-ea89-b1fb67602cef@redhat.com>
On 15/05/2017 16:06, Paolo Bonzini wrote:
>
>
> On 15/05/2017 16:04, Eric Blake wrote:
>> On 05/12/2017 06:38 PM, Philippe Mathieu-Daudé wrote:
>>> If you have coccinelle installed you can apply this script using:
>>>
>>> $ spatch \
>>> --macro-file scripts/cocci-macro-file.h \
>>> --dir target --in-place
>>>
>>> You can also use directly Peter Senna Tschudin docker image (easier):
>>>
>>> $ 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
>>>
>>> Then verified that no manual touchups are required.
>>>
>>> The following thread was helpful while writing this script:
>>>
>>> https://github.com/coccinelle/coccinelle/issues/86
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>> scripts/coccinelle/tcg_gen_extract.cocci | 103 +++++++++++++++++++++++++++++++
>>> 1 file changed, 103 insertions(+)
>>> create mode 100644 scripts/coccinelle/tcg_gen_extract.cocci
>>
>> It's still not obvious to me whether we want this script in the tree (as
>> something we plan to rerun regularly to check for regressions), or just
>> in the commit message (useful for the one-time location of spots to
>> optimize, but something we don't anticipate repeating).
>
> I think it's useful. New backends can have this issue, plus it shows
> some advanced Coccinelle techniques.
>
I agree: I think it's a good idea to have a place in QEMU directory with
all past coccinelle scripts to help to write the new ones.
Laurent
next prev parent reply other threads:[~2017-05-15 14:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 23:38 [Qemu-devel] [RFC PATCH v4 0/6] optimize various tcg_gen() functions using extract op Philippe Mathieu-Daudé
2017-05-12 23:38 ` [Qemu-devel] [RFC PATCH v4 1/6] coccinelle: add a script to optimize tcg op using tcg_gen_extract() Philippe Mathieu-Daudé
2017-05-15 14:04 ` Eric Blake
2017-05-15 14:06 ` Paolo Bonzini
2017-05-15 14:10 ` Laurent Vivier [this message]
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 2/6] target/alpha: optimize cvtlq() using extract op Philippe Mathieu-Daudé
2017-05-13 0:04 ` Richard Henderson
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 3/6] target/arm: optimize rev16() " Philippe Mathieu-Daudé
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 4/6] target/m68k: optimize bcd_flags() " Philippe Mathieu-Daudé
2017-05-13 0:05 ` Richard Henderson
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 5/6] target/ppc: optimize various functions " Philippe Mathieu-Daudé
2017-05-13 0:05 ` Richard Henderson
2017-05-15 4:12 ` David Gibson
2017-05-16 0:02 ` Philippe Mathieu-Daudé
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 6/6] target/sparc: " Philippe Mathieu-Daudé
2017-05-13 0:08 ` Richard Henderson
2017-07-18 3:18 ` Philippe Mathieu-Daudé
2017-07-18 3:44 ` Richard Henderson
2017-05-13 1:16 ` [Qemu-devel] [RFC PATCH v4 0/6] optimize various tcg_gen() " Julia Lawall
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=19ed7405-d072-de74-867b-c353e59bee48@redhat.com \
--to=lvivier@redhat.com \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=elfring@users.sourceforge.net \
--cc=f4bug@amsat.org \
--cc=julia.lawall@lip6.fr \
--cc=mjt@tls.msk.ru \
--cc=nicolas.palix@imag.fr \
--cc=nikunj@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).