coccinelle: deref_null: improve performance
authorJulia Lawall <Julia.Lawall@lip6.fr>
Mon, 21 May 2018 06:58:59 +0000 (08:58 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 22 May 2018 14:00:23 +0000 (23:00 +0900)
commit21195f8e9a473035dc692a40a145f4f083fe5c1f
tree65eb26573939cfa05f5f446bd7e4c05b36389a0f
parent32d0572a75c81a2c70394f9e110ca080b9a733b1
coccinelle: deref_null: improve performance

Move rules looking for some special cases of safe dereferences before
the collection of NULL-tested values.  The special cases are fairly
rare, but somewhat costly to find, because isomorphisms create many
variants of the rules.  There is thus no need to search for them over
and over for each NULL tested expression.  Collecting them just once
is sufficient and more efficient.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/coccinelle/null/deref_null.cocci