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/sparc/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/sparc/CSE.ml')
-rw-r--r-- | asmcomp/sparc/CSE.ml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/asmcomp/sparc/CSE.ml b/asmcomp/sparc/CSE.ml new file mode 100644 index 0000000000..c38bab8fe1 --- /dev/null +++ b/asmcomp/sparc/CSE.ml @@ -0,0 +1,31 @@ +(***********************************************************************) +(* *) +(* 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 Sparc *) + +open Mach +open CSEgen + +class cse = object (self) + +inherit cse_generic (* as super *) + +method! is_cheap_operation op = + match op with + | Iconst_int n | Iconst_blockheader n -> n <= 4095n && n >= -4096n + | _ -> false + +end + +let fundecl f = + (new cse)#fundecl f + |