From a3f1744823d6dbeaf400812de86263fb615bbbba Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 17 May 2013 11:37:39 +0000 Subject: 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 --- driver/Clflags.ml | 1 + driver/Driver.ml | 2 ++ 2 files changed, 3 insertions(+) (limited to 'driver') 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- to turn off -f) : -fsmall-const Set maximal size for allocation in small constant area -ffloat-const-prop Control constant propagation of floats (=0: none, =1: limited, =2: full; default is full) + -ftailcalls Optimize function calls in tail position [on] -falign-functions Set alignment (in bytes) of function entry points -falign-branch-targets Set alignment (in bytes) of branch targets -falign-cond-branches 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 -- cgit v1.2.3