summaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2017-11-20 08:32:57 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2017-11-20 08:32:57 +0000
commit19a30b7123aa90caf7de3e9ec588266e218f8028 (patch)
tree32e5e7fae29ce15cabb6a27c2982ccabef10c491 /gcc/print-rtl.c
parent7cfaa4c643eabd8d5aaa74a8406f0bf4880b8fe6 (diff)
vec.h (debug_helper): New function.
* vec.h (debug_helper): New function. (DEFINE_DEBUG_VEC): New macro. * hash-set.h (debug_helper): New function. (DEFINE_DEBUG_HASH_SET): New macro. * cfg.c (debug_slim (edge)): New function. Call DEFINE_DEBUG_VEC for edges. Call DEFINE_DEBUG_HASH_SET for edges. * cfghooks.c (debug_slim (basic_block)): New function. Call DEFINE_DEBUG_VEC for basic blocks. Call DEFINE_DEBUG_HASH_SET for basic blocks. * print-tree.c (debug_slim): New function to handle trees. Call DEFINE_DEBUG_VEC for trees. Call DEFINE_DEBUG_HASH_SET for trees. (debug (vec<tree, va_gc>) &): Remove. (debug (<vec<tree, va_gc>) *): Remove. * print-rtl.c (debug_slim): New function to handle const_rtx. Call DEFINE_DEBUG_VEC for rtx_def. Call DEFINE_DEBUG_VEC for rtx_insn. Call DEFINE_DEBUG_HASH_SET for rtx_def. Call DEFINE_DEBUG_HASH_SET for rtx_insn. * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove. (debug (vec<rtx_insn *> *ptr): Remove. (debug_insn_vector): Remove. * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree. From-SVN: r254945
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r--gcc/print-rtl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 28d99862cad..5fe23801ab2 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -967,6 +967,23 @@ debug (const rtx_def *ptr)
fprintf (stderr, "<nil>\n");
}
+/* Like debug_rtx but with no newline, as debug_helper will add one.
+
+ Note: No debug_slim(rtx_insn *) variant implemented, as this
+ function can serve for both rtx and rtx_insn. */
+
+static void
+debug_slim (const_rtx x)
+{
+ rtx_writer w (stderr, 0, false, false, NULL);
+ w.print_rtx (x);
+}
+
+DEFINE_DEBUG_VEC (rtx_def *)
+DEFINE_DEBUG_VEC (rtx_insn *)
+DEFINE_DEBUG_HASH_SET (rtx_def *)
+DEFINE_DEBUG_HASH_SET (rtx_insn *)
+
/* Count of rtx's to print with debug_rtx_list.
This global exists because gdb user defined commands have no arguments. */