From b22f1165b23be33da6cb7f6ac681c14abec37c23 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 9 Oct 2020 15:51:33 +0200 Subject: new flags: -fpredict, -ftailduplicate n, -funrollsingle n instead of just -fduplicate n --- driver/Driver.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'driver/Driver.ml') diff --git a/driver/Driver.ml b/driver/Driver.ml index 90afb812..b0b1cdea 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -420,8 +420,9 @@ let cmdline_actions = @ f_opt "move-loop-invariants" option_fmove_loop_invariants @ f_opt "redundancy" option_fredundancy @ f_opt "postpass" option_fpostpass - @ [ Exact "-fduplicate", Integer (fun n -> option_fduplicate := n) ] - @ f_opt "invertcond" option_finvertcond + @ [ Exact "-ftailduplicate", Integer (fun n -> option_ftailduplicate := n) ] + @ f_opt "predict" option_fpredict + @ [ Exact "-funrollsingle", Integer (fun n -> option_funrollsingle := n) ] @ f_opt "tracelinearize" option_ftracelinearize @ f_opt_str "postpass" option_fpostpass option_fpostpass_sched @ f_opt "inline" option_finline -- cgit From b09b9a2e3f3f2612582bbf7ee624a48ad0e0b40f Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 14 Oct 2020 11:08:55 +0200 Subject: Updated --help --- driver/Driver.ml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'driver/Driver.ml') diff --git a/driver/Driver.ml b/driver/Driver.ml index b0b1cdea..fae1524f 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -207,15 +207,11 @@ Processing options: -fpostpass Perform postpass scheduling (only for K1 architecture) [on] -fpostpass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =ilp: ILP, =greedy: just packing bundles) - -fduplicate Perform tail duplication to form superblocks on predicted traces - nb_nodes control the heuristic deciding to duplicate or not - A value of -1 desactivates the entire pass (including branch prediction) - A value of 0 desactivates the duplication (but activates the branch prediction) - FIXME : this is desactivated by default for now - -finvertcond Invert conditions based on predicted paths (to prefer fallthrough). - Requires -fduplicate to be also activated [on] - -ftracelinearize Linearizes based on the traces identified by duplicate phase - It is heavily recommended to activate -finvertcond with this pass [off] + -fpredict Insert static branch prediction information [on] + Also swaps ifso/ifnot branches accordingly at RTL level + -ftailduplicate n Perform tail duplication for RTL code blocks of size n (not counting Inops) [0] + -ftracelinearize Uses branch prediction information to improve the Linearize [on] + -funrollsingle n Unrolls a single iteration of innermost loops of size n (not counting Inops) [0] -fforward-moves Forward moves after CSE -finline Perform inlining of functions [on] -finline-functions-called-once Integrate functions only required by their -- cgit From 80760a9c21eb83c9807a569b0fb07216420cc721 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 14 Oct 2020 11:56:00 +0200 Subject: -O0 desactivates -fpredict and -ftracelinearize --- driver/Driver.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'driver/Driver.ml') diff --git a/driver/Driver.ml b/driver/Driver.ml index fae1524f..7ab80540 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -276,6 +276,7 @@ let dump_mnemonics destfile = let optimization_options = [ option_ftailcalls; option_fifconversion; option_fconstprop; option_fcse; option_fcse2; option_fcse3; + option_fpredict; option_ftracelinearize; option_fpostpass; option_fredundancy; option_finline; option_finline_functions_called_once; ] -- cgit From a2f31f2b886ccb9656a019db1780aabc1789368a Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 16 Oct 2020 14:38:06 +0200 Subject: Loop body unrolling with -funrollbody n --- driver/Driver.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'driver/Driver.ml') diff --git a/driver/Driver.ml b/driver/Driver.ml index 7ab80540..12f50762 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -212,6 +212,7 @@ Processing options: -ftailduplicate n Perform tail duplication for RTL code blocks of size n (not counting Inops) [0] -ftracelinearize Uses branch prediction information to improve the Linearize [on] -funrollsingle n Unrolls a single iteration of innermost loops of size n (not counting Inops) [0] + -funrollbody n Unrolls once the body of innermost loops of size n (not counting Inops) [0] -fforward-moves Forward moves after CSE -finline Perform inlining of functions [on] -finline-functions-called-once Integrate functions only required by their @@ -420,6 +421,7 @@ let cmdline_actions = @ [ Exact "-ftailduplicate", Integer (fun n -> option_ftailduplicate := n) ] @ f_opt "predict" option_fpredict @ [ Exact "-funrollsingle", Integer (fun n -> option_funrollsingle := n) ] + @ [ Exact "-funrollbody", Integer (fun n -> option_funrollbody := n) ] @ f_opt "tracelinearize" option_ftracelinearize @ f_opt_str "postpass" option_fpostpass option_fpostpass_sched @ f_opt "inline" option_finline -- cgit