diff options
author | Xionghu Luo <luoxhu@linux.ibm.com> | 2020-10-26 02:52:39 -0500 |
---|---|---|
committer | Xionghu Luo <luoxhu@linux.ibm.com> | 2020-10-26 02:52:39 -0500 |
commit | a7d153ab8471bde05a9883d4cda9319ff89ea14b (patch) | |
tree | ea3c2aca296b23430c3d8207e1275e908eae1016 /gcc/cfg.c | |
parent | 9651cba4360ef7fbdff4f64faf9f650e1246a5c1 (diff) | |
download | gcc-a7d153ab8471bde05a9883d4cda9319ff89ea14b.zip gcc-a7d153ab8471bde05a9883d4cda9319ff89ea14b.tar.gz gcc-a7d153ab8471bde05a9883d4cda9319ff89ea14b.tar.bz2 |
Add overloaded debug_bb and debug_bb_n with dump flags
Add overloads that accept a flags argument so we can print
debug_bb_n (5, TDF_DETAILS) in gdb, also the debug_bb_slim
variant would then be just a forwarder.
gcc/ChangeLog:
2020-10-26 Xionghu Luo <luoxhu@linux.ibm.com>
* cfg.c (debug_bb): New overloaded function.
(debug_bb_n): New overloaded function.
* cfg.h (debug_bb): New declaration.
(debug_bb_n): New declaration.
* print-rtl.c (debug_bb_slim): Call debug_bb with flags.
Diffstat (limited to 'gcc/cfg.c')
-rw-r--r-- | gcc/cfg.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -720,7 +720,7 @@ free_aux_for_edges (void) DEBUG_FUNCTION void debug_bb (basic_block bb) { - dump_bb (stderr, bb, 0, dump_flags); + debug_bb (bb, dump_flags); } DEBUG_FUNCTION basic_block @@ -731,6 +731,24 @@ debug_bb_n (int n) return bb; } +/* Print BB with specified FLAGS. */ + +DEBUG_FUNCTION void +debug_bb (basic_block bb, dump_flags_t flags) +{ + dump_bb (stderr, bb, 0, flags); +} + +/* Print basic block numbered N with specified FLAGS. */ + +DEBUG_FUNCTION basic_block +debug_bb_n (int n, dump_flags_t flags) +{ + basic_block bb = BASIC_BLOCK_FOR_FN (cfun, n); + debug_bb (bb, flags); + return bb; +} + /* Dumps cfg related information about basic block BB to OUTF. If HEADER is true, dump things that appear before the instructions contained in BB. If FOOTER is true, dump things that appear after. |