2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* 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 GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
2014-04-26 03:40:22 -07:00
|
|
|
|
|
|
|
(* CSE for Sparc *)
|
|
|
|
|
|
|
|
open Mach
|
|
|
|
open CSEgen
|
|
|
|
|
2016-03-09 02:40:16 -08:00
|
|
|
class cse = object
|
2014-04-26 03:40:22 -07:00
|
|
|
|
|
|
|
inherit cse_generic (* as super *)
|
|
|
|
|
|
|
|
method! is_cheap_operation op =
|
|
|
|
match op with
|
2016-07-29 07:07:10 -07:00
|
|
|
| Iconst_int n -> n <= 4095n && n >= -4096n
|
2014-04-26 03:40:22 -07:00
|
|
|
| _ -> false
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
let fundecl f =
|
|
|
|
(new cse)#fundecl f
|