]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[arm] Add -mverbose-cost-dump and de-verbosify cost dumps
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 14 Dec 2017 15:53:36 +0000 (15:53 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 14 Dec 2017 15:53:36 +0000 (15:53 +0000)
This patch adds an -mverbose-cost-dump option, similar to the one in aarch64.
It makes the RTX cost dump print the RTX we're costing in the backend, as well as its cost.
This can be distracting in other cost-related RTL dumps like combine's.

So now we don't dump the backend information by default, but provide the power-user option -mverbose-cost-dump
to enable the old verbose dumping.

This option is for GCC developers debugging the compiler only, so no documentation are added.
It's also trivially simple in functionality so no test is added either.

Bootstrapped and tested on arm-none-linux-gnueabihf.

Committed to trunk.

* config/arm/arm.opt (mverbose-cost-dump): New option.
* config/arm/arm.c (arm_rtx_costs): Use it.

From-SVN: r255644

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.opt

index b7c76314d18719e9d4001326c52075a9944144fa..8753aa0e4ec02f1470c2b33f46138611d0d202f8 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * config/arm/arm.opt (mverbose-cost-dump): New option.
+       * config/arm/arm.c (arm_rtx_costs): Use it.
+
 2017-12-14  Andreas Schwab  <schwab@linux-m68k.org>
 
        PR bootstrap/83396
index f34b6e0d93315e99372cc61d22c971f2641d7943..9b29a0a154e6beb43cb8463c6ee4cfc7b7a9dc67 100644 (file)
@@ -11068,7 +11068,7 @@ arm_rtx_costs (rtx x, machine_mode mode ATTRIBUTE_UNUSED, int outer_code,
                                current_tune->insn_extra_cost,
                                total, speed);
 
-  if (dump_file && (dump_flags & TDF_DETAILS))
+  if (dump_file && arm_verbose_cost)
     {
       print_rtl_single (dump_file, x);
       fprintf (dump_file, "\n%s cost: %d (%s)\n", speed ? "Hot" : "Cold",
index 6060516dd409597309fe095737373ef5c27de541..48f645885981c3f244ed36535d01f8b14bb42719 100644 (file)
@@ -254,6 +254,10 @@ mvectorize-with-neon-double
 Target Report RejectNegative Mask(NEON_VECTORIZE_DOUBLE)
 Use Neon double-word (rather than quad-word) registers for vectorization.
 
+mverbose-cost-dump
+Common Undocumented Var(arm_verbose_cost) Init(0)
+Enable more verbose RTX cost dumps during debug.  For GCC developers use only.
+
 mword-relocations
 Target Report Var(target_word_relocations) Init(TARGET_DEFAULT_WORD_RELOCATIONS)
 Only generate absolute relocations on word sized values.