On Thu, 3 Oct 2019, Jan Hubicka wrote:
-/* Return inlining_insns_single limit for function N */
+/* Return inlining_insns_single limit for function N. If HINT is true
+ scale up the bound. */
static int
-inline_insns_single (cgraph_node *n)
+inline_insns_single (cgraph_node *n, bool hint)
{
if (opt_for_fn (n->decl, optimize >= 3))
- return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE);
+ {
+ if (hint)
+ return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE)
+ * PARAM_VALUE (PARAM_INLINE_HEURISTICS_HINT_PERCENT) / 100;
+ return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE);
+ }
else
- return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE_O2);
+ {
+ if (hint)
+ return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE_O2)
+ * PARAM_VALUE (PARAM_INLINE_HEURISTICS_HINT_PERCENT_O2) / 100;
+ return PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE_O2);
+ }
}
Hello,
I don't really understand the purpose of having 2 params where one is used
for -O2 and the other for -O3 (I didn't check -Os), instead of a single
param whose default value depends on -On (what we had before?). Is it so
that we can more easily mix some functions compiled at -O3 with other
functions compiled at -O2 and thus using a different param?
--
Marc Glisse