> On 2 Dec 2025, at 8:06 pm, Jan Hubička <[email protected]> wrote:
>
> External email: Use caution opening links or attachments
>
>
> On Fri, Nov 28, 2025 at 9:33 AM Kugan Vivekanandarajah
> <[email protected]> wrote:
> Hi,
>
>
> In i 'inline_functions_by_afdo' that attempts to inline functions guided
> by AutoFDO profiles unnecessarily sets'inlined' flag to true. This patch just
> removes this.
> This is actually causing ICE in some cases.
>
>
> gcc/ChangeLog:
>
> 2025-11-27 Kugan Vivekanandarajah <[email protected]>
>
> * ipa-inline.cc (inline_functions_by_afdo): Remove resetting bool
> inlined.
>
>
> Is this OK?
> OK,
> This looks like some sort of pastor. Thanks for catching it. I wonder how
> this causes an ICE? It should only force one extra update of the inline
> summary.
I am seeing this now:
internal compiler error: in release_body, at cgraph.cc:2232
0x3ad0413 internal_error(char const*, ...)
../../gcc/gcc/diagnostic-global-context.cc:787
0x3adfce7 fancy_abort(char const*, int, char const*)
../../gcc/gcc/diagnostics/context.cc:1805
0x13570e7 cgraph_node::release_body(bool)
../../gcc/gcc/cgraph.cc:2232
0x180fc87 symbol_table::remove_unreachable_nodes(_IO_FILE*)
../../gcc/gcc/ipa.cc:545
0x19e2c8b execute_todo
../../gcc/gcc/passes.cc:2163
>
This goes away if I use -fno-auto-profile-inlining
Also:
(gdb) p *node
$1 = {<symtab_node> = {<toplevel_node> = {lto_file_data = 0x0, order = 39, type
= SYMTAB_FUNCTION}, resolution = LDPR_PREVAILING_DEF_IRONLY, definition = 1,
alias = 0, transparent_alias = 0, weakref = 0, cpp_implicit_alias = 0, symver =
0, analyzed = 1, writeonly = 0, refuse_visibility_changes = 0,
externally_visible = 0, no_reorder = 0, force_output = 0, forced_by_abi = 0,
unique_name = 0, implicit_section = 0, body_removed = 0, semantic_interposition
= 1, used_from_other_partition = 0, in_other_partition = 0, address_taken = 0,
in_init_priority_hash = 0, need_lto_streaming = 0, offloadable = 0,
ifunc_resolver = 0, decl = 0xfffff76e9e00, next = 0xfffff76a4300, previous =
0xfffff76a2cc0, next_sharing_asm_name = 0x0, previous_sharing_asm_name =
0xfffff7999550, same_comdat_group = 0x0, ref_list = {
references = {m_vec = 0x51248f0}, referring = {m_vec = 0x0}},
alias_target = 0x0, aux = 0x0, x_comdat_group = 0x0, x_section = 0x0, m_uid =
40}, callees = 0x0, callers = 0x0, indirect_calls = 0x0, next_sibling_clone =
0x0, prev_sibling_clone = 0x0, clones = 0x0, clone_of = 0xfffff7999550,
call_site_hash = 0x0, former_clone_of = 0x0, simdclone = 0x0, simd_clones =
0x0, ipa_transforms_to_apply = {m_vec = 0x0}, inlined_to = 0xfffff76a2cc0, rtl
= 0x0, count = {static n_bits = 60, static max_count = 1152921504606846974,
static uninitialized_count = 1152921504606846975, m_val = 1152921504606846975,
m_quality = GUESSED_LOCAL}, count_materialization_scale = 10000, profile_id =
0, unit_id = 0, tp_first_run = 0, thunk = 0, used_as_abstract_origin = 0,
lowered = 1, process = 0, frequency = NODE_FREQUENCY_NORMAL,
only_called_at_startup = 0, only_called_at_exit = 0, tm_clone = 0,
dispatcher_function = 0, dispatcher_resolver_function = 0, is_target_clone = 0,
calls_comdat_local = 0, icf_merged = 0, nonfreeing_fn = 0, merged_comdat = 0,
merged_extern_inline = 0, parallelized_function = 0, split_part = 0,
indirect_call_target = 0, local = 1, versionable = 0, can_change_signature = 1,
redefined_extern_inline = 0, tm_may_enter_irr = 0, ipcp_clone = 0, gc_candidate
= 0, called_by_ifunc_resolver = 0, has_omp_variant_constructs = 0,
m_summary_id = 1}
This has inlined_to = 0xfffff76a2cc0
Thanks,
Kugan
> Honza
>
> Thanks,
> Kugan