diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83581ac41bf..c39e0d4d55a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-09-08 Segher Boessenkool + + * genemit.c (gen_split): Print the filename and line number where the + splitter (or peephole2) was defined, to the dump file. + 2019-09-07 Jakub Jelinek PR tree-optimization/91665 diff --git a/gcc/genemit.c b/gcc/genemit.c index 3ff819720ec..4d7011c3aff 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -609,9 +609,14 @@ gen_split (md_rtx_info *info) if (GET_CODE (split) == DEFINE_PEEPHOLE2) output_peephole2_scratches (split); + const char *fn = info->loc.filename; + for (const char *p = fn; *p; p++) + if (*p == '/') + fn = p + 1; + printf (" if (dump_file)\n"); - printf (" fprintf (dump_file, \"Splitting with gen_%s_%d\\n\");\n", - name, info->index); + printf (" fprintf (dump_file, \"Splitting with gen_%s_%d (%s:%d)\\n\");\n", + name, info->index, fn, info->loc.lineno); printf (" start_sequence ();\n");