https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81465

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 41977
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41977&action=edit
Tested patch candidate

Adding patch candidate that adds:
!opt_for_fn (edge->caller->decl, optimize)) to estimate_edge_growth. That's
need because the mentioned revision introduced:

  FOR_EACH_DEFINED_FUNCTION (node)
    if (!node->alias
        && (flag_generate_lto || flag_generate_offload|| flag_wpa
            || opt_for_fn (node->decl, optimize)))
      inline_analyze_function (node);

which does not calculate ipa_call_summaries->get (edge)->call_stmt_size.
With the patch applied, no other inlining happens as inline_small_functions
skips functions w/o optimize option.

Reply via email to