aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Inliningaux.ml
diff options
context:
space:
mode:
Diffstat (limited to 'backend/Inliningaux.ml')
-rw-r--r--backend/Inliningaux.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/backend/Inliningaux.ml b/backend/Inliningaux.ml
index 42f58247..842e0c93 100644
--- a/backend/Inliningaux.ml
+++ b/backend/Inliningaux.ml
@@ -86,7 +86,10 @@ let static_called_once id io =
(* To be considered: heuristics based on size of function? *)
let should_inline (io: inlining_info) (id: ident) (f: coq_function) =
- if !Clflags.option_finline && not (C2C.atom_is_noinline id) then
- C2C.atom_is_inline id || static_called_once id io
- else
+ if !Clflags.option_finline then begin
+ match C2C.atom_inline id with
+ | C2C.Inline -> true
+ | C2C.Noinline -> false
+ | C2C.No_specifier -> static_called_once id io
+ end else
false