aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/aarch64
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2014-05-16 08:45:39 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2014-05-16 08:45:39 +0000
commit0ee859b53ba2af19f58f9e58ab38da1a8a16b5d6 (patch)
tree6394a9b5b428f3bb9d5e48887f752461eaed2a09 /gcc/config/aarch64
parent60bff090208c1602c2282ab9e516ce725d36bd51 (diff)
downloadgcc-0ee859b53ba2af19f58f9e58ab38da1a8a16b5d6.zip
gcc-0ee859b53ba2af19f58f9e58ab38da1a8a16b5d6.tar.gz
gcc-0ee859b53ba2af19f58f9e58ab38da1a8a16b5d6.tar.bz2
[AArch64 costs 3/18] Wrap aarch64_rtx_costs to dump verbose output
gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs_wrapper): New. (TARGET_RTX_COSTS): Call it. From-SVN: r210495
Diffstat (limited to 'gcc/config/aarch64')
-rw-r--r--gcc/config/aarch64/aarch64.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 7374e81..da693b4 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -63,6 +63,7 @@
#include "cfgloop.h"
#include "tree-vectorizer.h"
#include "config/arm/aarch-cost-tables.h"
+#include "dumpfile.h"
/* Defined for convenience. */
#define POINTER_BYTES (POINTER_SIZE / BITS_PER_UNIT)
@@ -5031,6 +5032,26 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBUTE_UNUSED,
return false;
}
+/* Wrapper around aarch64_rtx_costs, dumps the partial, or total cost
+ calculated for X. This cost is stored in *COST. Returns true
+ if the total cost of X was calculated. */
+static bool
+aarch64_rtx_costs_wrapper (rtx x, int code, int outer,
+ int param, int *cost, bool speed)
+{
+ bool result = aarch64_rtx_costs (x, code, outer, param, cost, speed);
+
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ print_rtl_single (dump_file, x);
+ fprintf (dump_file, "\n%s cost: %d (%s)\n",
+ speed ? "Hot" : "Cold",
+ *cost, result ? "final" : "partial");
+ }
+
+ return result;
+}
+
static int
aarch64_register_move_cost (enum machine_mode mode,
reg_class_t from_i, reg_class_t to_i)