From 62a07ee96d51c29bab9668d8c41bf5f8bdf9e23d Mon Sep 17 00:00:00 2001 From: xleroy Date: Thu, 18 Aug 2011 09:24:23 +0000 Subject: SimplVolatile: new pass to eliminate read-modify-write ops over volatiles Elsewhere: refactoring, moving common code into Cutil and Transform (to be continued) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1716 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cparser/Transform.mli | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'cparser/Transform.mli') diff --git a/cparser/Transform.mli b/cparser/Transform.mli index 8f2c5f87..82159975 100644 --- a/cparser/Transform.mli +++ b/cparser/Transform.mli @@ -13,13 +13,29 @@ (* *) (* *********************************************************************) -(* Generic program transformation *) - +(** Creation of fresh temporary variables. *) val reset_temps : unit -> unit val new_temp_var : ?name:string -> C.typ -> C.ident val new_temp : ?name:string -> C.typ -> C.exp val get_temps : unit -> C.decl list +(** Avoiding repeated evaluation of a l-value *) + +val bind_lvalue: Env.t -> C.exp -> (C.exp -> C.exp) -> C.exp + +(** Generic transformation of a statement *) + +type context = Val | Effects + +val stmt : (C.location -> Env.t -> context -> C.exp -> C.exp) -> + Env.t -> C.stmt -> C.stmt + +(** Generic transformation of a function definition *) + +val fundef : (Env.t -> C.stmt -> C.stmt) -> Env.t -> C.fundef -> C.fundef + +(** Generic transformation of a program *) + val program : ?decl:(Env.t -> C.decl -> C.decl) -> ?fundef:(Env.t -> C.fundef -> C.fundef) -> -- cgit