combine: Print insns with the cost dump
authorSegher Boessenkool <segher@kernel.crashing.org>
Thu, 29 Jun 2017 17:28:47 +0000 (19:28 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Thu, 29 Jun 2017 17:28:47 +0000 (19:28 +0200)
In the combine dump file, at the start there is a list of the RTL cost
of every insn.  The only thing listed about the insns is the UID though.
To make it more useful, this patch prints the insn itself as well (in
slim format).

* combine.c (combine_instructions): Print insns to dump_file, together
with their costs.

From-SVN: r249802

gcc/ChangeLog
gcc/combine.c

index 2f339ccb3b19c79fd59e01f1fd04e5775eb9ec43..dac1d7af9a06d0cb3d0ae93bb03d2c9e7819b531 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * combine.c (combine_instructions): Print insns to dump_file, together
+       with their costs.
+
 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
 
        * asan.c (asan_emit_stack_protection): Update.
index 2d49bc2233c98ac7d4f8e59d80458d7bee39269c..e99382685c359eeb86d21d65aee185136b3d47e9 100644 (file)
@@ -1213,8 +1213,10 @@ combine_instructions (rtx_insn *f, unsigned int nregs)
              INSN_COST (insn) = insn_rtx_cost (PATTERN (insn),
                                                optimize_this_for_speed_p);
            if (dump_file)
-             fprintf (dump_file, "insn_cost %d: %d\n",
-                      INSN_UID (insn), INSN_COST (insn));
+             {
+               fprintf (dump_file, "insn_cost %d for ", INSN_COST (insn));
+               dump_insn_slim (dump_file, insn);
+             }
          }
     }