diff options
author | Kurt Garloff <garloff@suse.de> | 2003-03-02 21:18:16 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2003-03-02 21:18:16 +0000 |
commit | bc52247263d666d1e942145d1f643491a0c2d81a (patch) | |
tree | 8779d656c10e23abf78abe1a1c94a499d158237b /gcc/toplev.c | |
parent | f4ae98be562f298bbf51fd9b54ccce7f1ab0d0e6 (diff) | |
download | gcc-bc52247263d666d1e942145d1f643491a0c2d81a.zip gcc-bc52247263d666d1e942145d1f643491a0c2d81a.tar.gz gcc-bc52247263d666d1e942145d1f643491a0c2d81a.tar.bz2 |
params.def: Introduce parameter max-inline-insns-rtl for a separate limit for the RTL inliner.
2003-03-02 Kurt Garloff <garloff@suse.de>
* params.def: Introduce parameter max-inline-insns-rtl for
a separate limit for the RTL inliner.
* params.h: Likewise.
* integrate.c (function_cannot_inline_p): Use it.
* toplev.c (decode_f_option): Set multiple parameters
controlling inlining with -finline-limit.
* params.def: Fix orthographic and typographic errors.
* doc/invoke.texi: Document parameters controlling inlining
and the way -finline-limit sets multiple of them.
* tree.h (struct tree_decl): Introduce inlined_function_flag,
recording whether the function became eligible for inlining
by a compiler flag rather than the declaration.
Provide DID_INLINE_FUNC macro to access it.
* c-decl.c (grokdeclarator): Set DID_INLINE_FUNC.
* cp/decl.c (grokfndecl): Likewise.
* toplev.c (rest_of_compilation): Likewise.
* cp/optimize (maybe_clone_body): Copy DID_INLINE_FUNC.
* print-tree.c (print_node): Report it.
* params.def: Introduce new max-inline-insns-auto limit.
* params.h: Likewise.
* tree-inline.c (inlinable_function_p): Apply it to functions
with DID_INLINE_FUNC set.
* toplev.c (decode_f_option): Initialize it from -finline-limit
value.
* doc/invoke.texi: Document new parameter.
From-SVN: r63688
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 4135fff..215b318 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2481,12 +2481,16 @@ rest_of_compilation (decl) goto exit_rest_of_compilation; } } - else - /* ??? Note that this has the effect of making it look - like "inline" was specified for a function if we choose - to inline it. This isn't quite right, but it's - probably not worth the trouble to fix. */ + else { + /* ??? Note that we used to just make it look like if + the "inline" keyword was specified when we decide + to inline it (because of -finline-functions). + garloff@suse.de, 2002-04-24: Add another flag to + actually record this piece of information. */ + if (!DECL_INLINE (decl)) + DID_INLINE_FUNC (decl) = 1; inlinable = DECL_INLINE (decl) = 1; + } } insns = get_insns (); @@ -4085,6 +4089,16 @@ decode_f_option (arg) read_integral_parameter (option_value, arg - 2, MAX_INLINE_INSNS); set_param_value ("max-inline-insns", val); + set_param_value ("max-inline-insns-single", val/2); + set_param_value ("max-inline-insns-auto", val/2); + set_param_value ("max-inline-insns-rtl", val); + if (val/4 < MIN_INLINE_INSNS) + { + if (val/4 > 10) + set_param_value ("min-inline-insns", val/4); + else + set_param_value ("min-inline-insns", 10); + } } else if ((option_value = skip_leading_substring (arg, "tls-model="))) { |