aboutsummaryrefslogtreecommitdiffstats
path: root/aarch64
diff options
context:
space:
mode:
authorLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2020-11-06 12:05:53 +0100
committerLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2020-11-06 12:05:53 +0100
commit86d2b0555ee09d648c8d7373b0a9a4acdcb344e0 (patch)
tree429f3d8c0f667305901312ec821ab70659908110 /aarch64
parent2f3706e8a063575e2aaf37cf49d6cb20a9c4bb24 (diff)
downloadcompcert-kvx-86d2b0555ee09d648c8d7373b0a9a4acdcb344e0.tar.gz
compcert-kvx-86d2b0555ee09d648c8d7373b0a9a4acdcb344e0.zip
Preparing the repo for debugging postpass and executing tests
Diffstat (limited to 'aarch64')
-rw-r--r--aarch64/OpWeightsAsm.ml55
-rw-r--r--aarch64/PostpassSchedulingOracle.ml8
2 files changed, 32 insertions, 31 deletions
diff --git a/aarch64/OpWeightsAsm.ml b/aarch64/OpWeightsAsm.ml
index 5ba5832b..c1d0583a 100644
--- a/aarch64/OpWeightsAsm.ml
+++ b/aarch64/OpWeightsAsm.ml
@@ -221,10 +221,10 @@ module Cortex_A53 = struct
| Uxtw -> 1
| Uxtx -> 1
| Btbl -> 1
- | Allocframe -> 1
- | Freeframe -> 1
- | Builtin -> 1
- | Cvtx2w -> 1
+ | Allocframe -> 51
+ | Freeframe -> 51
+ | Builtin -> 51
+ | Cvtx2w -> 51
let resources_of_op (i : real_instruction) (nargs : int) =
match i with
@@ -317,30 +317,30 @@ module Cortex_A53 = struct
| Uxtw -> [| 1; 1; 0; 0 |]
| Uxtx -> [| 1; 1; 0; 0 |]
| Btbl -> [| 1; 1; 0; 0 |]
- | Allocframe -> [| 1; 0; 0; 0 |]
- | Freeframe -> [| 1; 0; 0; 0 |]
- | Builtin -> [| 1; 0; 0; 0 |]
- | Cvtx2w -> [| 1; 0; 0; 0 |]
+ | Allocframe -> [| 1; 1; 1; 1 |]
+ | Freeframe -> [| 1; 1; 1; 1 |]
+ | Builtin -> [| 1; 1; 1; 1 |]
+ | Cvtx2w -> [| 1; 1; 1; 1 |]
- (*let non_pipelined_resources_of_op (op : operation) (nargs : int) =
- match op with
- | Odiv | Odivu -> [| 29 |]
- | Odivfs -> [| 20 |]
- | Odivl | Odivlu | Odivf -> [| 50 |]
- | _ -> [| -1 |];;
+ (*let non_pipelined_resources_of_op (op : operation) (nargs : int) =
+ match op with
+ | Odiv | Odivu -> [| 29 |]
+ | Odivfs -> [| 20 |]
+ | Odivl | Odivlu | Odivf -> [| 50 |]
+ | _ -> [| -1 |];;
- let resources_of_cond (cmp : condition) (nargs : int) =
- (match cmp with
- | Ccompf _ (* r FP comparison *)
- | Cnotcompf _ (* r negation of an FP comparison *)
- | Ccompfzero _ (* r comparison with 0.0 *)
- | Cnotcompfzero _ (* r negation of comparison with 0.0 *)
- | Ccompfs _ (* r FP comparison *)
- | Cnotcompfs _ (* r negation of an FP comparison *)
- | Ccompfszero _ (* r equal to 0.0 *)
- | Cnotcompfszero _ (* r not equal to 0.0 *) ->
- [| 1; 1; 1; 0 |]
- | _ -> [| 1; 1; 0; 0 |] )*)
+ let resources_of_cond (cmp : condition) (nargs : int) =
+ (match cmp with
+ | Ccompf _ (* r FP comparison *)
+ | Cnotcompf _ (* r negation of an FP comparison *)
+ | Ccompfzero _ (* r comparison with 0.0 *)
+ | Cnotcompfzero _ (* r negation of comparison with 0.0 *)
+ | Ccompfs _ (* r FP comparison *)
+ | Cnotcompfs _ (* r negation of an FP comparison *)
+ | Ccompfszero _ (* r equal to 0.0 *)
+ | Cnotcompfszero _ (* r not equal to 0.0 *) ->
+ [| 1; 1; 1; 0 |]
+ | _ -> [| 1; 1; 0; 0 |] )*)
let latency_of_load trap chunk _ _ = 3
@@ -362,7 +362,8 @@ let get_opweights () : opweights =
pipelined_resource_bounds = Cortex_A53.resource_bounds;
nr_non_pipelined_units = Cortex_A53.nr_non_pipelined_units;
latency_of_op = Cortex_A53.latency_of_op;
- resources_of_op = Cortex_A53.resources_of_op
+ resources_of_op =
+ Cortex_A53.resources_of_op
(*non_pipelined_resources_of_op = Cortex_A53.non_pipelined_resources_of_op;*)
(*latency_of_load = Cortex_A53.latency_of_load;*)
(*resources_of_load = Cortex_A53.resources_of_load;*)
diff --git a/aarch64/PostpassSchedulingOracle.ml b/aarch64/PostpassSchedulingOracle.ml
index a2e15139..831080d5 100644
--- a/aarch64/PostpassSchedulingOracle.ml
+++ b/aarch64/PostpassSchedulingOracle.ml
@@ -17,7 +17,7 @@ open Asmblock
open OpWeightsAsm
open InstructionScheduler
-let debug = false
+let debug = true
(**
* Extracting infos from Asm instructions
@@ -890,11 +890,11 @@ let smart_schedule bb =
pack_result bb'
let bblock_schedule bb =
- if debug then (
+ let identity_mode = not !Clflags.option_fpostpass in
+ if (debug && not identity_mode) then (
Printf.eprintf "###############################\n";
Printf.eprintf "SCHEDULING\n" );
- (*if Compopts.optim_postpass () then smart_schedule bb else dumb_schedule bb*)
- smart_schedule bb
+ if identity_mode then pack_result bb else smart_schedule bb
(** Called schedule function from Coq *)