From 56579f8ade21cb0a880ffbd6d5e28f152e951be8 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 6 Apr 2014 07:11:12 +0000 Subject: Merge of branch linear-typing: 1) Revised division of labor between RTLtyping and Lineartyping: - RTLtyping no longer keeps track of single-precision floats, switches from subtype-based inference to unification-based inference. - Unityping: new library for unification-based inference. - Locations: don't normalize at assignment in a stack slot - Allocation, Allocproof: simplify accordingly. - Lineartyping: add inference of locations that contain a single-precision float. - Stackingproof: adapted accordingly. This addresses a defect report whereas RTLtyping was rejecting code that used a RTL pseudoreg to hold both double- and single-precision floats (see test/regression/singlefloats.c). This corresponds to commits 2435+2436 plus improvements in Lineartyping. 2) Add -dtimings option to measure compilation times. Moved call to C parser from Elab to Parse, to make it easier to measure parsing time independently of elaboration time. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2449 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- lib/Camlcoq.ml | 66 ---------------------------------------------------------- 1 file changed, 66 deletions(-) (limited to 'lib') diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml index ca48341..c580e21 100644 --- a/lib/Camlcoq.ml +++ b/lib/Camlcoq.ml @@ -324,69 +324,3 @@ let coqfloat_of_camlfloat f = let camlfloat_of_coqfloat f = Int64.float_of_bits(camlint64_of_coqint(Float.bits_of_double f)) -(* Timing facility *) - -(* -let timers = Hashtbl.create 9 - -let add_to_timer name time = - let old = try Hashtbl.find timers name with Not_found -> 0.0 in - Hashtbl.replace timers name (old +. time) - -let time name fn arg = - let start = Unix.gettimeofday() in - try - let res = fn arg in - add_to_timer name (Unix.gettimeofday() -. start); - res - with x -> - add_to_timer name (Unix.gettimeofday() -. start); - raise x - -let time2 name fn arg1 arg2 = - let start = Unix.gettimeofday() in - try - let res = fn arg1 arg2 in - add_to_timer name (Unix.gettimeofday() -. start); - res - with x -> - add_to_timer name (Unix.gettimeofday() -. start); - raise x - -let time3 name fn arg1 arg2 arg3 = - let start = Unix.gettimeofday() in - try - let res = fn arg1 arg2 arg3 in - add_to_timer name (Unix.gettimeofday() -. start); - res - with x -> - add_to_timer name (Unix.gettimeofday() -. start); - raise x - -let time4 name fn arg1 arg2 arg3 arg4 = - let start = Unix.gettimeofday() in - try - let res = fn arg1 arg2 arg3 arg4 in - add_to_timer name (Unix.gettimeofday() -. start); - res - with x -> - add_to_timer name (Unix.gettimeofday() -. start); - raise x - -let print_timers () = - Hashtbl.iter - (fun name time -> Printf.printf "%-20s %.3f\n" name time) - timers - -let _ = at_exit print_timers -*) - -(* Heap profiling facility *) - -(* -let heap_info msg = - Gc.full_major(); - let s = Gc.stat() in - Printf.printf "%s: size %d live %d\n " msg s.Gc.heap_words s.Gc.live_words; - flush stdout -*) -- cgit v1.2.3