diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-08-18 09:24:23 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-08-18 09:24:23 +0000 |
commit | 62a07ee96d51c29bab9668d8c41bf5f8bdf9e23d (patch) | |
tree | a44ae71bef9021e42a91da1787e7e83e75d18cad /cparser/Transform.mli | |
parent | 84cb73abe0f777521ee67cec2405c9593420d3da (diff) | |
download | compcert-kvx-62a07ee96d51c29bab9668d8c41bf5f8bdf9e23d.tar.gz compcert-kvx-62a07ee96d51c29bab9668d8c41bf5f8bdf9e23d.zip |
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
Diffstat (limited to 'cparser/Transform.mli')
-rw-r--r-- | cparser/Transform.mli | 20 |
1 files changed, 18 insertions, 2 deletions
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) -> |