This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ping: [PATCH V6] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)


Hi,
building Firefox I now get:

#0  internal_error (gmsgid=0x28f8597 "in %s, at %s:%d") at ../../gcc/diagnostic.c:1578
#1  0x0000000001e20ae2 in fancy_abort (file=0x2892574 "../../gcc/ipa-cp.c", line=386, function=0x2
    893510 <ipa_get_parm_lattices(ipa_node_params*, int)::__FUNCTION__> "ipa_get_parm_lattices") at ../../gcc/diagnostic.c:1649
#2  0x0000000001cf42cd in ipa_get_parm_lattices (info=0x7fff7e4de360, i=3) at ../../gcc/ipa-cp.c:386
#3  0x0000000001cf6aa1 in ipa_agg_value_from_node (info=0x7fff7e4de360, node=0x7fff9bf1b000, item=0x7f
    ff97e1cb08) at ../../gcc/ipa-cp.c:1612
#4  0x0000000001cf6c8c in ipa_agg_value_set_from_jfunc (info=0x7fff7e4de360, node=0x7fff9bf1b000, ag
    g_jfunc=0x7fff32b15a60) at ../../gcc/ipa-cp.c:1682
#5  0x0000000000c84fcb in evaluate_properties_for_edge (e=0x7fff2ceac068, inline_p=true, clause_pt
    r=0x7fffffffde04, nonspec_clause_ptr=0x7fffffffde00, known_vals_ptr=0x7fffffffddf8, known_con
    texts_ptr=0x7fffffffddf0, known_aggs_ptr=0x7fffffffdde8) at ../../gcc/ipa-fnsummary.c:573
#6  0x0000000000ca4d6a in do_estimate_edge_time (edge=0x7fff2ceac068) at ../../gcc/ipa-inline-analysis.c:200
#7  0x0000000000ca52cf in do_estimate_edge_size (edge=0x7fff2ceac068) at ../../gcc/ipa-inline-analysis.c:317
#8  0x0000000001d0e9d8 in estimate_edge_size (edge=0x7fff2ceac068) at ../../gcc/ipa-inline.h:78
#9  0x0000000001d0ea28 in estimate_edge_growth (edge=0x7fff2ceac068) at ../../gcc/ipa-inline.h:89
#10 0x0000000001d10d0c in want_inline_small_function_p (e=0x7fff2ceac068, report=false) at ../../gcc/ipa-inline.c:84
   4
#11 0x0000000001d12bbb in update_callee_keys (heap=0x7fffffffe0f0, node=0x7fff9bf1b000, updated_
    nodes=0x7fffffffe0d0) at ../../gcc/ipa-inline.c:1470
#12 0x0000000001d14bca in inline_small_functions () at ../../gcc/ipa-inline.c:2153
#13 0x0000000001d165d8 in ipa_inline () at ../../gcc/ipa-inline.c:2613
#14 0x0000000001d17353 in (anonymous namespace)::pass_ipa_inline::execute (this=0x2f111e0) at ../../gcc/ipa-inline.c:3013
#15 0x0000000000e6c5a5 in execute_one_pass (pass=0x2f111e0) at ../../gcc/passes.c:2494
#16 0x0000000000e6d4ee in execute_ipa_pass_list (pass=0x2f111e0) at ../../gcc/passes.c:2921
#17 0x00000000008c6f19 in do_whole_program_analysis () at ../../gcc/lto/lto.c:469
#18 0x00000000008c721f in lto_main () at ../../gcc/lto/lto.c:641
#19 0x0000000000fbcc5b in compile_file () at ../../gcc/toplev.c:458
#20 0x0000000000fbfe87 in do_compile () at ../../gcc/toplev.c:2279
#21 0x0000000000fc0164 in toplev::main (this=0x7fffffffe56e, argc=2220, argv=0x2ecf450) at ../../gcc/t
   oplev.c:2414
#22 0x0000000001df1d19 in main (argc=53, argv=0x7fffffffe668) at ../../gcc/main.c:39

The issue is that ipa_agg_value_set_from_jfunc asks for parameter #3
which is out of range (function has 3 parmaeters). This is src_idx so I
think the jump function is not correctly updated after inlining. Which
also suggest the fact that the jump function causing problem is created
while producing inline clone:

Old value = 0
New value = 3
0x0000000000cc7115 in vec_copy_construct<ipa_agg_jf_item> (dst=0x7fff97e1cb08, src=0x7fff7e19e2c8, n=1) at ../.
   ./gcc/vec.h:523
523         ::new (static_cast<void*>(dst)) T (*src);
(gdb) bt
#0  0x0000000000cc7115 in vec_copy_construct<ipa_agg_jf_item> (dst=0x7fff97e1cb08, src=0x7fff7e19e2c8, n=1)
     at ../../gcc/vec.h:523
#1  0x0000000000cc506f in vec<ipa_agg_jf_item, va_gc, vl_embed>::copy (this=0x7fff7e19e2c0) at ../../gcc/vec.h:951
#2  0x0000000000cc2fe4 in vec_safe_copy<ipa_agg_jf_item, va_gc> (src=0x7fff7e19e2c0) at ../../gcc/vec.h:815
#3  0x0000000000cbb486 in ipa_edge_args_sum_t::duplicate (this=0x7fff8f20ac00, src=0x7fff9bcb4888, dst=0
    x7fff2ceac068, old_args=0x7fff7e193a50, new_args=0x7fff9a03ede0) at ../../gcc/ipa-prop.c:4217
#4  0x0000000000cc3f16 in call_summary<ipa_edge_args*>::symtab_duplication (edge1=0x7fff9bcb4888, edge2=0x7fff2ce
    ac068, data=0x7fff8f20ac00) at ../../gcc/symbol-summary.h:737
#5  0x00000000009a6186 in symbol_table::call_edge_duplication_hooks (this=0x7ffff70e1100, cs1=0x7fff9bcb4888,
cs2=0x7fff2ceac068) at ../../gcc/cgraph.c:455
#6  0x00000000009bef8a in cgraph_edge::clone (this=0x7fff9bcb4888, n=0x7fff9bc3c9a0, call_stmt=0x0,
    stmt_uid=5, num=..., den=..., update_original=true) at ../../gcc/cgraphcl
   ones.c:141
#7  0x00000000009bfd29 in cgraph_node::create_clone (this=0x7fff9bc3c840, new_decl=0x7fffc8b0b500,
    [36mprof_count=..., update_original=true, redirect_callers=..., call_duplication
    _hook=true, new_inlined_to=0x7fff9bf1b000, param_adjustments=0x0,
suffix=0x0) at ../../gcc/cgraphclones.c:393
#8  0x0000000001d213bc in clone_inlined_nodes (e=0x7fffa84b6f08, duplicate=true, update_orig
    inal=true, overall_size=0x2e617d0 <overall_size>) at ../../gcc/ipa-inline-transform.c:222
#9  0x0000000001d2200e in inline_call (e=0x7fffa84b6f08, update_original=true, new_edges=
    0x7fffffffe0c8, overall_size=0x2e617d0 <overall_size>, update_overall_summary=true, callee_
    removed=0x0) at ../../gcc/ipa-inline-transform.c:482
#10 0x0000000001d14af3 in inline_small_functions () at ../../gcc/ipa-inline.c:2141
#11 0x0000000001d165d8 in ipa_inline () at ../../gcc/ipa-inline.c:2613
#12 0x0000000001d17353 in (anonymous namespace)::pass_ipa_inline::execute (this=0x2f111e0) at ../../gcc/ipa-inline.c:3013
#13 0x0000000000e6c5a5 in execute_one_pass (pass=0x2f111e0) at ../../gcc/passes.c:2494
#14 0x0000000000e6d4ee in execute_ipa_pass_list (pass=0x2f111e0) at ../../gcc/passes.c:2921
#15 0x00000000008c6f19 in do_whole_program_analysis () at ../../gcc/lto/lto.c:469
#16 0x00000000008c721f in lto_main () at ../../gcc/lto/lto.c:641
#17 0x0000000000fbcc5b in compile_file () at ../../gcc/toplev.c:458

So it seems something is wrong with updating formal_id of the new jump
functions in update_jump_functions_after_inlining?

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]