From: Jakub Jelinek
Date: Mon, 31 Oct 2011 11:26:40 +0100
> Or alternatively you could remove the whole if (! !next_note ...)
> next_note = NULL_RTX; stmt and move your cache to a global var and
> clear it when reaching end of function (like
> e.g. last_var_location_insn is cleared in dwarf2out_e
On Sun, Oct 30, 2011 at 09:55:42PM -0400, David Miller wrote:
> --- a/gcc/dwarf2out.c
> +++ b/gcc/dwarf2out.c
> @@ -20149,7 +20151,35 @@ dwarf2out_var_location (rtx loc_note)
>if (var_loc_p && !DECL_P (NOTE_VAR_LOCATION_DECL (loc_note)))
> return;
>
> - next_real = next_real_insn (loc_n
Tests such as limits-fndefn.c spend %97 of their time in
next_real_insn() when -g is on the command line.
It's the invocation from dwarf2out_var_location(). These test cases
are basically 100,000 consecutive var location notes, followed by a
real instruction.
This is similar to the reorg issue