Currently, the splitter dumpfiles only say "scanning new insn with uid = N." and "deleting insn with uid = N.". This makes it hard to track down which splitter actually fired, especially so if there are many similar splitters and one is slightly broken.
This patch makes the splitters write their name to the dumpfile when they are called. As a side benefit it also becomes obvious in the dumpfiles what "new insn"s belong together with what "deleting insn"s. Bootstrapped and regression tested on powerpc64-linux, no new failures; is this okay for mainline? Segher --- gcc/genemit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/genemit.c b/gcc/genemit.c index 16b5644..55e7372 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -578,6 +578,10 @@ gen_split (rtx split) if (GET_CODE (split) == DEFINE_PEEPHOLE2) output_peephole2_scratches (split); + printf (" if (dump_file)\n"); + printf (" fprintf (dump_file, \"Splitting with gen_%s_%d\\n\");\n", + name, insn_code_number); + printf (" start_sequence ();\n"); /* The fourth operand of DEFINE_SPLIT is some code to be executed @@ -813,6 +817,7 @@ from the machine description file `md'. */\n\n"); printf ("#include \"tm-constrs.h\"\n"); printf ("#include \"ggc.h\"\n"); printf ("#include \"basic-block.h\"\n"); + printf ("#include \"dumpfile.h\"\n"); printf ("#include \"target.h\"\n\n"); printf ("#define FAIL return (end_sequence (), _val)\n"); printf ("#define DONE return (_val = get_insns (), end_sequence (), _val)\n\n"); -- 1.8.1.4