diff options
| author | Damien Doligez <damien.doligez-inria.fr> | 2014-04-28 11:49:52 +0000 |
|---|---|---|
| committer | Damien Doligez <damien.doligez-inria.fr> | 2014-04-28 11:49:52 +0000 |
| commit | cc25e53ad310eb32d4854a1505ac3a9a917c8368 (patch) | |
| tree | 101a8f24490f8ef63c75820cfd945cc4d7f669fc /asmcomp/amd64/CSE.ml | |
| parent | e94190206fe983154d5606a448e434aec03783d0 (diff) | |
| parent | f1f362698f931494a305d48667936ffee2012b64 (diff) | |
| download | ocaml-safe-string.tar.gz | |
merge trunk up to commit 14699safe-string
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/safe-string@14700 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/amd64/CSE.ml')
| -rw-r--r-- | asmcomp/amd64/CSE.ml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/asmcomp/amd64/CSE.ml b/asmcomp/amd64/CSE.ml new file mode 100644 index 0000000000..63ef088531 --- /dev/null +++ b/asmcomp/amd64/CSE.ml @@ -0,0 +1,36 @@ +(***********************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Gallium, INRIA Rocquencourt *) +(* *) +(* Copyright 2014 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the Q Public License version 1.0. *) +(* *) +(***********************************************************************) + +(* CSE for the AMD64 *) + +open Arch +open Mach +open CSEgen + +class cse = object (self) + +inherit cse_generic as super + +method! class_of_operation op = + match op with + | Ispecific(Ilea _) -> Op_pure + | Ispecific(Istore_int(_, _, is_asg)) -> Op_store is_asg + | Ispecific(Istore_symbol(_, _, is_asg)) -> Op_store is_asg + | Ispecific(Ioffset_loc(_, _)) -> Op_store true + | Ispecific(Ifloatarithmem _) -> Op_load + | _ -> super#class_of_operation op + +end + +let fundecl f = + (new cse)#fundecl f + |
