diff options
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 6746b3f450f..7e36070f7ea 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -157,11 +157,13 @@ function_cannot_inline_p (fndecl) tree last = tree_last (TYPE_ARG_TYPES (TREE_TYPE (fndecl))); /* For functions marked as inline increase the maximum size to - MAX_INLINE_INSNS (-finline-limit-<n>). For regular functions - use the limit given by INTEGRATE_THRESHOLD. */ + MAX_INLINE_INSNS_RTL (--param max-inline-insn-rtl=<n>). For + regular functions use the limit given by INTEGRATE_THRESHOLD. + Note that the RTL inliner is not used by the languages that use + the tree inliner (C, C++). */ int max_insns = (DECL_INLINE (fndecl)) - ? (MAX_INLINE_INSNS + ? (MAX_INLINE_INSNS_RTL + 8 * list_length (DECL_ARGUMENTS (fndecl))) : INTEGRATE_THRESHOLD (fndecl); @@ -378,6 +380,8 @@ copy_decl_for_inlining (decl, from_fn, to_fn) else { copy = copy_node (decl); + /* The COPY is not abstract; it will be generated in TO_FN. */ + DECL_ABSTRACT (copy) = 0; (*lang_hooks.dup_lang_specific_decl) (copy); /* TREE_ADDRESSABLE isn't used to indicate that a label's @@ -3002,15 +3006,17 @@ set_decl_abstract_flags (decl, setting) from its DECL_SAVED_INSNS. Used for inline functions that are output at end of compilation instead of where they came in the source. */ +static GTY(()) struct function *old_cfun; + void output_inline_function (fndecl) tree fndecl; { - struct function *old_cfun = cfun; enum debug_info_type old_write_symbols = write_symbols; const struct gcc_debug_hooks *const old_debug_hooks = debug_hooks; struct function *f = DECL_SAVED_INSNS (fndecl); + old_cfun = cfun; cfun = f; current_function_decl = fndecl; @@ -3026,6 +3032,11 @@ output_inline_function (fndecl) debug_hooks = &do_nothing_debug_hooks; } + /* Make sure warnings emitted by the optimizers (e.g. control reaches + end of non-void function) is not wildly incorrect. */ + input_filename = DECL_SOURCE_FILE (fndecl); + lineno = DECL_SOURCE_LINE (fndecl); + /* Compile this function all the way down to assembly code. As a side effect this destroys the saved RTL representation, but that's okay, because we don't need to inline this anymore. */ |