diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-12-07 17:24:41 +0100 |
---|---|---|
committer | Bernhard Schommer <bschommer@users.noreply.github.com> | 2017-12-08 16:31:58 +0100 |
commit | f05e9e7ee26116ab88d8a5d7ff3ea68d1bd950ca (patch) | |
tree | 0ebd91e8052f10254b577e891f26c657b5b6d836 | |
parent | 2699bcfc44ca33056f5ec2c718f857308c61d94a (diff) | |
download | compcert-f05e9e7ee26116ab88d8a5d7ff3ea68d1bd950ca.tar.gz compcert-f05e9e7ee26116ab88d8a5d7ff3ea68d1bd950ca.zip |
Remove unused code. BUg 22642
-rw-r--r-- | backend/Inliningaux.ml | 4 | ||||
-rw-r--r-- | cparser/Elab.ml | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/backend/Inliningaux.ml b/backend/Inliningaux.ml index 71db2730..42f58247 100644 --- a/backend/Inliningaux.ml +++ b/backend/Inliningaux.ml @@ -77,7 +77,7 @@ let inlining_analysis (p: program) = empty_inlining_info (* Test whether a function is static and called only once *) -let static_called_once fn_sig id io = +let static_called_once 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) else @@ -87,6 +87,6 @@ let static_called_once fn_sig id io = 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 f.fn_sig id io + C2C.atom_is_inline id || static_called_once id io else false diff --git a/cparser/Elab.ml b/cparser/Elab.ml index c2d5ece7..e846e301 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -2365,7 +2365,6 @@ let elab_fundef env spec name defs body loc = && can_return then warning loc Invalid_noreturn "function '%s' declared 'noreturn' should not return" s; (* Build and emit function definition *) - let inline = inline in let fn = { fd_storage = sto1; fd_inline = inline; |