diff options
author | Martin Liska <mliska@suse.cz> | 2019-11-14 13:08:57 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-11-14 12:08:57 +0000 |
commit | 78a502caec5371cf5d107c3a6cf944bac0aaeb7c (patch) | |
tree | 7f84b73d1a7e066bac0f6790400d858ad8b34f20 /gcc/ipa-cp.c | |
parent | 4c4503bf8c538bdbd8db8940aae3d7000885776e (diff) | |
download | gcc-78a502caec5371cf5d107c3a6cf944bac0aaeb7c.zip gcc-78a502caec5371cf5d107c3a6cf944bac0aaeb7c.tar.gz gcc-78a502caec5371cf5d107c3a6cf944bac0aaeb7c.tar.bz2 |
Add Optimization keyword for param_max_inline_insns_auto param.
2019-11-14 Martin Liska <mliska@suse.cz>
* ipa-cp.c (devirtualization_time_bonus): Use opt_for_fn
of a callee to get value of the param.
* ipa-inline.c (inline_insns_auto): Use proper
opt_for_fn.
* opts.c (maybe_default_option): Do not overwrite param
value if optimization level does not match. Note that
params usually have default value set via Init() keyword.
* params.opt: Remove -param=max-inline-insns-auto-O2.
* cif-code.def (MAX_INLINE_INSNS_AUTO_O2_LIMIT): Remove.
* doc/invoke.texi: Remove documentation of
max-inline-insns-auto-O2.
2019-11-14 Martin Liska <mliska@suse.cz>
* c-c++-common/asan/memcmp-1.c: Update expected backtrace.
From-SVN: r278218
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index f0d354b..86c6253 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -2936,11 +2936,13 @@ devirtualization_time_bonus (struct cgraph_node *node, int size = ipa_size_summaries->get (callee)->size; /* FIXME: The values below need re-considering and perhaps also integrating into the cost metrics, at lest in some very basic way. */ - if (size <= param_max_inline_insns_auto / 4) + int max_inline_insns_auto + = opt_for_fn (callee->decl, param_max_inline_insns_auto); + if (size <= max_inline_insns_auto / 4) res += 31 / ((int)speculative + 1); - else if (size <= param_max_inline_insns_auto / 2) + else if (size <= max_inline_insns_auto / 2) res += 15 / ((int)speculative + 1); - else if (size <= param_max_inline_insns_auto + else if (size <= max_inline_insns_auto || DECL_DECLARED_INLINE_P (callee->decl)) res += 7 / ((int)speculative + 1); } |