diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2018-12-17 15:43:37 +0100 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2018-12-17 15:43:37 +0100 |
commit | ff1a4a32676fad3a78aad69d963f9f94bb07615c (patch) | |
tree | 1be819074805478c2982ffefd44e060d543e2cd4 /mppa_k1c/PostpassSchedulingOracle.ml | |
parent | f9de154cde1974a8fa9afec9ad83653384ec912f (diff) | |
download | compcert-kvx-ff1a4a32676fad3a78aad69d963f9f94bb07615c.tar.gz compcert-kvx-ff1a4a32676fad3a78aad69d963f9f94bb07615c.zip |
Added a simple postpass oracle that splits a bblock into single instruction bundles
Diffstat (limited to 'mppa_k1c/PostpassSchedulingOracle.ml')
-rw-r--r-- | mppa_k1c/PostpassSchedulingOracle.ml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mppa_k1c/PostpassSchedulingOracle.ml b/mppa_k1c/PostpassSchedulingOracle.ml new file mode 100644 index 00000000..451a3b26 --- /dev/null +++ b/mppa_k1c/PostpassSchedulingOracle.ml @@ -0,0 +1,18 @@ +open Asmblock + +let bundlize_label l = + match l with + | [] -> [] + | l -> [{ header = l; body = []; exit = None }] + +let rec bundlize_basic l = + match l with + | [] -> [] + | b :: l -> { header = []; body = [b]; exit = None } :: bundlize_basic l + +let bundlize_exit e = + match e with + | Some e -> [{ header = []; body = []; exit = Some e }] + | None -> [] + +let schedule (bb : bblock) : bblock list = bundlize_label bb.header @ bundlize_basic bb.body @ bundlize_exit bb.exit |