diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-12-07 17:14:31 +0100 |
---|---|---|
committer | Bernhard Schommer <bschommer@users.noreply.github.com> | 2017-12-08 16:31:58 +0100 |
commit | 2699bcfc44ca33056f5ec2c718f857308c61d94a (patch) | |
tree | 5de382a67e29bda2304106c22e0db6573739e0e5 /backend/Inliningaux.ml | |
parent | d2efd8b0e1c07e8ce7edc2a5eaa461aff08d2be6 (diff) | |
download | compcert-kvx-2699bcfc44ca33056f5ec2c718f857308c61d94a.tar.gz compcert-kvx-2699bcfc44ca33056f5ec2c718f857308c61d94a.zip |
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
Diffstat (limited to 'backend/Inliningaux.ml')
-rw-r--r-- | backend/Inliningaux.ml | 4 |
1 files changed, 2 insertions, 2 deletions
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 |