diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2020-02-03 10:52:53 +0100 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2020-02-03 10:52:53 +0100 |
commit | 7dca7590aa212806ee939244b253a6a067f34bfc (patch) | |
tree | 1449c8a386c23ab0a8d443ac46ebccb39a8630e9 | |
parent | 326bdc281c60ac826129b0a0fda33dc17d8498fa (diff) | |
download | compcert-kvx-7dca7590aa212806ee939244b253a6a067f34bfc.tar.gz compcert-kvx-7dca7590aa212806ee939244b253a6a067f34bfc.zip |
Added flag to desactivate condition inversion
-rw-r--r-- | backend/Duplicateaux.ml | 3 | ||||
-rw-r--r-- | driver/Clflags.ml | 1 | ||||
-rw-r--r-- | driver/Driver.ml | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/backend/Duplicateaux.ml b/backend/Duplicateaux.ml index 2dd07b76..84daa329 100644 --- a/backend/Duplicateaux.ml +++ b/backend/Duplicateaux.ml @@ -557,7 +557,8 @@ let rec invert_iconds_trace code = function let rec invert_iconds code = function | [] -> code | t :: ts -> - let code' = invert_iconds_trace code t + let code' = if !Clflags.option_finvertcond then invert_iconds_trace code t + else code in invert_iconds code' ts (* For now, identity function *) diff --git a/driver/Clflags.ml b/driver/Clflags.ml index 088845fe..a195e38b 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -28,6 +28,7 @@ let option_fconstprop = ref true let option_fcse = ref true let option_fredundancy = ref true let option_fduplicate = ref false +let option_finvertcond = ref true (* only active if option_fduplicate is also true *) let option_fpostpass = ref true let option_fpostpass_sched = ref "list" let option_fifconversion = ref true diff --git a/driver/Driver.ml b/driver/Driver.ml index 129248dc..3af1a937 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -200,6 +200,8 @@ Processing options: -fpostpass= <optim> Perform postpass scheduling with the specified optimization [list] (<optim>=list: list scheduling, <optim>=ilp: ILP, <optim>=greedy: just packing bundles) -fduplicate Perform tail duplication to form superblocks on predicted traces + -finvertcond Invert conditions based on predicted paths (to prefer fallthrough). + Requires -fduplicate to be also activated [on] -fforward-moves Forward moves after CSE -finline Perform inlining of functions [on] -finline-functions-called-once Integrate functions only required by their @@ -386,6 +388,7 @@ let cmdline_actions = @ f_opt "redundancy" option_fredundancy @ f_opt "postpass" option_fpostpass @ f_opt "duplicate" option_fduplicate + @ f_opt "invertcond" option_finvertcond @ f_opt_str "postpass" option_fpostpass option_fpostpass_sched @ f_opt "inline" option_finline @ f_opt "inline-functions-called-once" option_finline_functions_called_once |