[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1432846944-7122-1-git-send-email-Julia.Lawall@lip6.fr>
Date: Thu, 28 May 2015 23:02:15 +0200
From: Julia Lawall <Julia.Lawall@...6.fr>
To: devel@...verdev.osuosl.org
Cc: kernel-janitors@...r.kernel.org, HPDD-discuss@...ts.01.org,
linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-wireless@...r.kernel.org
Subject: [PATCH 0/9] drop unneeded goto
These patches drop gotos that jump to a label that is at the next
instruction, in the case that the label is not used elsewhere in the
function. The complete semantic patch that performs this transformation is
as follows:
// <smpl>
@r@
position p;
identifier l;
@@
if (...) goto l@p;
l:
@script:ocaml s@
p << r.p;
nm;
@@
nm := (List.hd p).current_element
@ok exists@
identifier s.nm,l;
position p != r.p;
@@
nm(...) {
<+... goto l@p; ...+>
}
@depends on !ok@
identifier s.nm;
position r.p;
identifier l;
@@
nm(...) {
<...
- if(...) goto l@p; l:
...>
}
// </smpl>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists