diff options
author | Mark Mitchell <mmitchell@usa.net> | 1997-12-15 10:55:11 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-15 10:55:11 -0700 |
commit | a701efba7e27b3a5f1a6c11071c30140de97a5b0 (patch) | |
tree | 333dcad5f45552a48c6cdbee76e91587d27c6497 /gcc | |
parent | 5e21ac7a624b32a8cd3c6261368a0b5e5068a81d (diff) | |
download | gcc-a701efba7e27b3a5f1a6c11071c30140de97a5b0.zip gcc-a701efba7e27b3a5f1a6c11071c30140de97a5b0.tar.gz gcc-a701efba7e27b3a5f1a6c11071c30140de97a5b0.tar.bz2 |
toplev.c (rest_of_compilation): Don't call save_for_inline_copy if all we're doing is dealing with -Wreturn-type.
* toplev.c (rest_of_compilation): Don't call save_for_inline_copy
if all we're doing is dealing with -Wreturn-type.
From-SVN: r17104
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/toplev.c | 61 |
2 files changed, 42 insertions, 24 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd9ca7f..44b7c09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 15 Mark Mitchell <mmitchell@usa.net> 11:41:32 1997 + + * toplev.c (rest_of_compilation): Don't call save_for_inline_copy + if all we're doing is dealing with -Wreturn-type. + Mon Dec 15 09:44:39 1997 Richard Henderson <rth@cygnus.com> * alpha.md (zero_extendqihi2, zero_extendqisi2, zero_extendqidi2): diff --git a/gcc/toplev.c b/gcc/toplev.c index 7f95a7d..a2d3f81 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3120,35 +3120,48 @@ rest_of_compilation (decl) { DECL_DEFER_OUTPUT (decl) = 1; - /* If -Wreturn-type, we have to do a bit of compilation. */ - if (! warn_return_type) + /* If -Wreturn-type, we have to do a bit of compilation. + However, if we just fall through we will call + save_for_inline_copying() which results in excessive + memory use. Instead, we just want to call + jump_optimize() to figure out whether or not we can fall + off the end of the function; we do the minimum amount of + work necessary to make that safe. And, we set optimize + to zero to keep jump_optimize from working too hard. */ + if (warn_return_type) { + int saved_optimize = optimize; + optimize = 0; + find_exception_handler_labels (); + jump_optimize (get_insns(), 0, 0, 0); + optimize = saved_optimize; + } + #ifdef DWARF_DEBUGGING_INFO - /* Generate the DWARF info for the "abstract" instance - of a function which we may later generate inlined and/or - out-of-line instances of. */ - if (write_symbols == DWARF_DEBUG) - { - set_decl_abstract_flags (decl, 1); - TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0)); - set_decl_abstract_flags (decl, 0); - } + /* Generate the DWARF info for the "abstract" instance + of a function which we may later generate inlined and/or + out-of-line instances of. */ + if (write_symbols == DWARF_DEBUG) + { + set_decl_abstract_flags (decl, 1); + TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0)); + set_decl_abstract_flags (decl, 0); + } #endif #ifdef DWARF2_DEBUGGING_INFO - /* Generate the DWARF2 info for the "abstract" instance - of a function which we may later generate inlined and/or - out-of-line instances of. */ - if (write_symbols == DWARF2_DEBUG) - { - set_decl_abstract_flags (decl, 1); - TIMEVAR (symout_time, dwarf2out_decl (decl)); - set_decl_abstract_flags (decl, 0); - } -#endif - TIMEVAR (integration_time, save_for_inline_nocopy (decl)); - RTX_INTEGRATED_P (DECL_SAVED_INSNS (decl)) = inlinable; - goto exit_rest_of_compilation; + /* Generate the DWARF2 info for the "abstract" instance + of a function which we may later generate inlined and/or + out-of-line instances of. */ + if (write_symbols == DWARF2_DEBUG) + { + set_decl_abstract_flags (decl, 1); + TIMEVAR (symout_time, dwarf2out_decl (decl)); + set_decl_abstract_flags (decl, 0); } +#endif + TIMEVAR (integration_time, save_for_inline_nocopy (decl)); + RTX_INTEGRATED_P (DECL_SAVED_INSNS (decl)) = inlinable; + goto exit_rest_of_compilation; } /* If we have to compile the function now, save its rtl and subdecls |