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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The indirect inlining thingy was indeed written by me, that is true,
but that was before speculative inlining was creating and disposing of
edges at difficult to predict times.  What happens is that:

1. In the course of inlining an edge, we call ipa_propagate_indirect_call_infos
   to adjust jump functions and to add newly discovered direct edges to
   new_edges vector so that they can be added to the heap later.

2. The speculation code in try_make_edge_direct_virtual_call decides
   to create speculation, so a new speculative edge is created and
   added to the vector.

3. Immediately after calling ipa_propagate_indirect_call_infos,
   check_speculations is called, which finds the edge
   !speculation_useful_p and removes it.  But the edge already is in
   the vector.

Let me see if I can add the respective usefulness test to the code
deciding to speculate.

Reply via email to