https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96729
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> Samples: 7K of event 'cycles:u', Event count (approx.): 7668407627          
> 
> Overhead  Command  Shared Object     Symbol                                 
> 
>   26.63%  cc1      cc1               [.] dwarf2out_next_real_insn
>    9.81%  cc1      cc1               [.]
> is_a_helper<rtx_insn*>::test<rtx_def>
> 
> guess there's some quadraticness here, walking the insn stream more times
> than necessary.

For the thousands of consecutive NOTE_INSN_VAR_LOCATION notes case
dwarf2out_var_location has a cache that avoids calling dwarf2out_next_real_insn
for each and thus the quadratic behavior.
Unfortunately the addition of NOTE_INSN_BEGIN_STMT and/or
NOTE_INSN_INLINE_ENTRY broke how this cache works, because
dwarf2out_var_location isn't called in those cases.

Reply via email to