From 2699bcfc44ca33056f5ec2c718f857308c61d94a Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 7 Dec 2017 17:14:31 +0100 Subject: Store the different inlining cases. In order to correctly support the noinline attribute we must store whether the function was specified with an inline specifer, had a noinline attribute or nothing. Bug 22642 --- backend/Inliningaux.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/Inliningaux.ml') diff --git a/backend/Inliningaux.ml b/backend/Inliningaux.ml index 90a8c6c8..71db2730 100644 --- a/backend/Inliningaux.ml +++ b/backend/Inliningaux.ml @@ -79,14 +79,14 @@ let inlining_analysis (p: program) = (* Test whether a function is static and called only once *) let static_called_once fn_sig id io = if !Clflags.option_finline_functions_called_once then - C2C.atom_is_static id && call_count id io <= 1 && not (address_taken id io) && not fn_sig.sig_cc.cc_vararg + C2C.atom_is_static id && call_count id io <= 1 && not (address_taken id io) else false (* To be considered: heuristics based on size of function? *) let should_inline (io: inlining_info) (id: ident) (f: coq_function) = - if !Clflags.option_finline then + if !Clflags.option_finline && not (C2C.atom_is_noinline id) then C2C.atom_is_inline id || static_called_once f.fn_sig id io else false -- cgit