https://gcc.gnu.org/g:bea593f115bccffcb2570fc9cd642403193265d9
commit r15-6913-gbea593f115bccffcb2570fc9cd642403193265d9 Author: Richard Biener <rguent...@suse.de> Date: Wed Jan 15 11:25:25 2025 +0100 Annotate dbg_line_numbers table The following adds /* <num> */ to dbg_line_numbers so there's the chance to more easily lookup the ID of the match.pd line number used for dumping when you want to debug a speicific replacement. It also cuts the lines down to 10 entries. 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, ... * 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. Diff: --- gcc/genmatch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 3ba6139e12da..b9a792e24554 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -890,8 +890,8 @@ 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"); + if (i % 10 == 0) + fprintf (f, "\n\t/* %d */ ", i); fprintf (f, "%d, ", dbg_line_numbers[i]); }