aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backend/Inliningaux.ml2
-rw-r--r--doc/ccomp.15
-rw-r--r--driver/Clflags.ml1
-rw-r--r--driver/Driver.ml1
4 files changed, 8 insertions, 1 deletions
diff --git a/backend/Inliningaux.ml b/backend/Inliningaux.ml
index 265831a5..df33e1ac 100644
--- a/backend/Inliningaux.ml
+++ b/backend/Inliningaux.ml
@@ -13,4 +13,4 @@
(* To be considered: heuristics based on size of function? *)
let should_inline (id: AST.ident) (f: RTL.coq_function) =
- C2C.atom_is_inline id
+ !Clflags.option_finline && C2C.atom_is_inline id
diff --git a/doc/ccomp.1 b/doc/ccomp.1
index c074ec9d..906e0ffc 100644
--- a/doc/ccomp.1
+++ b/doc/ccomp.1
@@ -138,6 +138,11 @@ Turn on/off common subexpression elimination.
Enabled by default.
.
.TP
+.BR \-finline ", " \-fno\-inline
+Turn on/off inlining of functions.
+Enabled by default.
+.
+.TP
.BR \-fredundancy ", " \-fno\-redundancy
Turn on/off redundancy elimination.
Enabled by default.
diff --git a/driver/Clflags.ml b/driver/Clflags.ml
index c7a5d3bf..2d92e09b 100644
--- a/driver/Clflags.ml
+++ b/driver/Clflags.ml
@@ -33,6 +33,7 @@ let option_faligncondbranchs = ref 0
let option_finline_asm = ref false
let option_mthumb = ref (Configuration.model = "armv7m")
let option_Osize = ref false
+let option_finline = ref true
let option_dprepro = ref false
let option_dparse = ref false
let option_dcmedium = ref false
diff --git a/driver/Driver.ml b/driver/Driver.ml
index 48bd9034..a91bb67c 100644
--- a/driver/Driver.ml
+++ b/driver/Driver.ml
@@ -409,6 +409,7 @@ let cmdline_actions =
@ f_opt "const-prop" option_fconstprop
@ f_opt "cse" option_fcse
@ f_opt "redundancy" option_fredundancy
+ @ f_opt "inline" option_finline
(* Code generation options *)
@ f_opt "fpu" option_ffpu
@ f_opt "sse" option_ffpu (* backward compatibility *)