aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2019-09-08 22:58:18 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2019-09-08 22:58:18 +0200
commit9976b31c66d9b9ec6dcc3005a2fb5ae1742aef6b (patch)
tree832c32467099212ee64153bc9eca7cc06ac459ae /gcc
parent30b94f55204397fe6537422c6aad82b155f01fec (diff)
downloadgcc-9976b31c66d9b9ec6dcc3005a2fb5ae1742aef6b.zip
gcc-9976b31c66d9b9ec6dcc3005a2fb5ae1742aef6b.tar.gz
gcc-9976b31c66d9b9ec6dcc3005a2fb5ae1742aef6b.tar.bz2
genemit: Print file+line in the "Splitting with" message
It's tiresome to have to look in insn-emit.c to see where some split came from, so let's print that info to the dump file as well. But don't print the full path, just the basename, for greater readability. * genemit.c (gen_split): Print the filename and line number where the splitter (or peephole2) was defined, to the dump file. From-SVN: r275497
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/genemit.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 83581ac4..c39e0d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-08 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * 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 <jakub@redhat.com>
PR tree-optimization/91665
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 3ff8197..4d7011c 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");