[PATCH] Add debug_bb_details and debug_bb_n_details

Xiong Hu Luo luoxhu@linux.ibm.com
Fri Oct 23 09:34:02 GMT 2020


Sometimes debug_bb_slim&debug_bb_n_slim is not enough, how about adding
this debug_bb_details&debug_bb_n_details? Or any other similar call
existed?

gcc/ChangeLog:

2020-10-23  Xionghu Luo  <luoxhu@linux.ibm.com>

	* print-rtl.c (debug_bb_details): New function.
	* (debug_bb_n_details): New function.
---
 gcc/print-rtl.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 25265efc71b..f45873b8863 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -2150,6 +2150,21 @@ debug_bb_n_slim (int n)
   debug_bb_slim (bb);
 }
 
+extern void debug_bb_details (basic_block);
+DEBUG_FUNCTION void
+debug_bb_details (basic_block bb)
+{
+  dump_bb (stderr, bb, 0, TDF_DETAILS | TDF_BLOCKS);
+}
+
+extern void debug_bb_n_details (int);
+DEBUG_FUNCTION void
+debug_bb_n_details (int n)
+{
+  basic_block bb = BASIC_BLOCK_FOR_FN (cfun, n);
+  debug_bb_details (bb);
+}
+
 #endif
 
 #if __GNUC__ >= 10
-- 
2.27.0.90.geebb51ba8c



More information about the Gcc-patches mailing list