summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-17 11:37:39 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-17 11:37:39 +0000
commita3f1744823d6dbeaf400812de86263fb615bbbba (patch)
treeff1ed0a68fe2dceb19bb768cec89912344ea1ef6 /driver
parent61f6aed04b846b174126d4b1cec28f6f1da20e52 (diff)
Add option -fno-tailcalls to turn off tailcall elimination (causes problem with some static analysis tools).
*/PrintAsm.ml: don't cfa_adjust at Pfreeframe, as more code from the function can appear after (in case of tailcalls). git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2256 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'driver')
-rw-r--r--driver/Clflags.ml1
-rw-r--r--driver/Driver.ml2
2 files changed, 3 insertions, 0 deletions
diff --git a/driver/Clflags.ml b/driver/Clflags.ml
index d70467a..88983d1 100644
--- a/driver/Clflags.ml
+++ b/driver/Clflags.ml
@@ -22,6 +22,7 @@ let option_fvararg_calls = ref true
let option_fpacked_structs = ref false
let option_fsse = ref true
let option_ffloatconstprop = ref 2
+let option_ftailcalls = ref true
let option_falignfunctions = ref (None: int option)
let option_falignbranchtargets = ref 0
let option_faligncondbranchs = ref 0
diff --git a/driver/Driver.ml b/driver/Driver.ml
index 3d981f0..0e54ad9 100644
--- a/driver/Driver.ml
+++ b/driver/Driver.ml
@@ -392,6 +392,7 @@ Code generation options: (use -fno-<opt> to turn off -f<opt>) :
-fsmall-const <n> Set maximal size <n> for allocation in small constant area
-ffloat-const-prop <n> Control constant propagation of floats
(<n>=0: none, <n>=1: limited, <n>=2: full; default is full)
+ -ftailcalls Optimize function calls in tail position [on]
-falign-functions <n> Set alignment (in bytes) of function entry points
-falign-branch-targets <n> Set alignment (in bytes) of branch targets
-falign-cond-branches <n> Set alignment (in bytes) of conditional branches
@@ -500,6 +501,7 @@ let cmdline_actions =
"-fnone$", Self (fun _ ->
List.iter (fun r -> r := false) language_support_options);
]
+ @ f_opt "tailcalls" option_ftailcalls
@ f_opt "longdouble" option_flongdouble
@ f_opt "struct-return" option_fstruct_return
@ f_opt "bitfields" option_fbitfields