From b05085c08cfa6799934e9ef4154a99293c283d03 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Thu, 22 Oct 2020 13:49:17 +0200 Subject: new OpWeights --- kvx/OpWeights.ml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'kvx/OpWeights.ml') diff --git a/kvx/OpWeights.ml b/kvx/OpWeights.ml index 9614fd92..23c2e5d3 100644 --- a/kvx/OpWeights.ml +++ b/kvx/OpWeights.ml @@ -1,5 +1,9 @@ open Op;; open PostpassSchedulingOracle;; +open PrepassSchedulingOracleDeps;; + +module KV3 = + struct let resource_bounds = PostpassSchedulingOracle.resource_bounds;; let nr_non_pipelined_units = 0;; @@ -89,3 +93,23 @@ let resources_of_store chunk addressing nargs = let resources_of_call _ _ = resource_bounds;; let resources_of_builtin _ = resource_bounds;; + end;; + +let get_opweights () : opweights = + match !Clflags.option_mtune with + | "kv3" | "" -> + { + pipelined_resource_bounds = KV3.resource_bounds; + nr_non_pipelined_units = KV3.nr_non_pipelined_units; + latency_of_op = KV3.latency_of_op; + resources_of_op = KV3.resources_of_op; + non_pipelined_resources_of_op = KV3.non_pipelined_resources_of_op; + latency_of_load = KV3.latency_of_load; + resources_of_load = KV3.resources_of_load; + resources_of_store = KV3.resources_of_store; + resources_of_cond = KV3.resources_of_cond; + latency_of_call = KV3.latency_of_call; + resources_of_call = KV3.resources_of_call; + resources_of_builtin = KV3.resources_of_builtin + } + | xxx -> failwith (Printf.sprintf "unknown -mtune: %s" xxx);; -- cgit