diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2020-12-02 15:36:17 +0100 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2020-12-02 15:36:17 +0100 |
commit | abae3de5118a4741ae1c2350a3e75b6e0a84a57d (patch) | |
tree | 96f5559905454b66192e84e75c7a63ac70b91ee5 | |
parent | ed8aec9f9fb259fe218d2d29efa3c8cc85ef93f1 (diff) | |
download | compcert-kvx-abae3de5118a4741ae1c2350a3e75b6e0a84a57d.tar.gz compcert-kvx-abae3de5118a4741ae1c2350a3e75b6e0a84a57d.zip |
Slight perf improvement
-rw-r--r-- | backend/Duplicateaux.ml | 4 | ||||
-rw-r--r-- | tools/compiler_expand.ml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/backend/Duplicateaux.ml b/backend/Duplicateaux.ml index 55414f40..4684d870 100644 --- a/backend/Duplicateaux.ml +++ b/backend/Duplicateaux.ml @@ -724,7 +724,7 @@ let rtl_successors_pref = function let rec find_last_node_before_loop code node trace is_loop_header = let rtl_succ = rtl_successors @@ get_some @@ PTree.get node code in let headers = List.filter (fun n -> - get_some @@ PTree.get n is_loop_header && List.mem n trace) rtl_succ in + get_some @@ PTree.get n is_loop_header && HashedSet.PSet.contains trace n) rtl_succ in match headers with | [] -> ( match (rtl_successors_pref @@ get_some @@ PTree.get node code) with @@ -760,8 +760,8 @@ let get_inner_loops f code is_loop_header = debug "HEADPREDS: %a\n" print_intlist head_preds; filtered end in - let body = HashedSet.PSet.elements body in let sb_final = find_last_node_before_loop code head body is_loop_header in + let body = HashedSet.PSet.elements body in { preds = preds; body = body; head = head; finals = finals; sb_final = sb_final; } ) diff --git a/tools/compiler_expand.ml b/tools/compiler_expand.ml index 04d29214..8d4f4f0b 100644 --- a/tools/compiler_expand.ml +++ b/tools/compiler_expand.ml @@ -25,10 +25,10 @@ TOTAL, Always, Require, (Some "Renumbering"), "Renumber"; PARTIAL, (Option "optim_CSE"), Require, (Some "CSE"), "CSE"; PARTIAL, Always, NoRequire, (Some "Static Prediction + inverting conditions"), "Staticpredict"; PARTIAL, Always, NoRequire, (Some "Unrolling one iteration out of innermost loops"), "Unrollsingle"; -TOTAL, Always, NoRequire, (Some "Renumbering pre unrolling"), "Renumber"; -PARTIAL, Always, NoRequire, (Some "Unrolling the body of innermost loops"), "Unrollbody"; TOTAL, Always, NoRequire, (Some "Renumbering pre tail duplication"), "Renumber"; PARTIAL, Always, NoRequire, (Some "Performing tail duplication"), "Tailduplicate"; +TOTAL, Always, NoRequire, (Some "Renumbering pre unrolling"), "Renumber"; +PARTIAL, Always, NoRequire, (Some "Unrolling the body of innermost loops"), "Unrollbody"; TOTAL, Always, NoRequire, (Some "Renumbering pre constprop"), "Renumber"; TOTAL, (Option "optim_constprop"), Require, (Some "Constant propagation"), "Constprop"; TOTAL, Always, NoRequire, (Some "Renumbering pre CSE"), "Renumber"; |