On Wed, 15 Jan 2025, Sam James wrote:
> Richard Biener <[email protected]> writes:
>
> > [...]. It also cuts the lines down to 10 entries.
>
> (This version doesn't ;))
Yeah - the one pushed did, I failed to commit & squash that additional
change ...
Richard.
> >
> > static int dbg_line_numbers[1267] = {
> > /* 0 */ 161, 164, 173, 175, 178, 181, 183, 189, 197, 195,
> > /* 10 */ 199, 201, 205, 923, 921, 2060, 2071, 2052, 2058, 2063,
> > ...
> >
> > Queued for testing, will push.
> >
> > * genmatch.cc (define_dump_logs): Make reverse lookup in
> > dbg_line_numbers easier by adding comments with start index
> > and cutting number of elements per line to 10.
> > ---
> > gcc/genmatch.cc | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc
> > index 57fccafb1ef..b1315d6b4f4 100644
> > --- a/gcc/genmatch.cc
> > +++ b/gcc/genmatch.cc
> > @@ -891,7 +891,7 @@ define_dump_logs (bool gimple, FILE *f)
> > for (unsigned i = 0; i < dbg_line_numbers.length () - 1; i++)
> > {
> > if (i % 20 == 0)
> > - fprintf (f, "\n\t");
> > + fprintf (f, "\n\t/* %d */ ", i);
> >
> > fprintf (f, "%d, ", dbg_line_numbers[i]);
> > }
>