From patchwork Thu Sep 27 22:57:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: RFC: LRA for x86/x86-64 [2/9] Date: Thu, 27 Sep 2012 12:57:33 -0000 From: Vladimir Makarov X-Patchwork-Id: 187519 Message-Id: <5064D9DD.8060507@redhat.com> To: GCC Patches LRA outputs a lot debug information about insns. I found that using slim insn/rtl presentation helps a lot for LRA debuging. The following patch makes slim presentation printing functions visible to LRA. It also implements one more such function. 2012-09-27 Vladimir Makarov * rtl.h (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sched-vis.c (print_value_slim): New. Index: rtl.h =================================================================== --- rtl.h (revision 191771) +++ rtl.h (working copy) @@ -2487,7 +2487,12 @@ extern rtx make_compound_operation (rtx, extern void delete_dead_jumptables (void); /* In sched-vis.c. */ -extern void dump_insn_slim (FILE *, const_rtx x); +extern void debug_bb_n_slim (int); +extern void debug_bb_slim (struct basic_block_def *); +extern void print_value_slim (FILE *, const_rtx, int); +extern void debug_rtl_slim (FILE *, const_rtx, const_rtx, int, int); +extern void dump_insn_slim (FILE *f, const_rtx x); +extern void debug_insn_slim (const_rtx x); /* In sched-rgn.c. */ extern void schedule_insns (void); Index: sched-vis.c =================================================================== --- sched-vis.c (revision 191771) +++ sched-vis.c (working copy) @@ -546,6 +546,19 @@ print_value (char *buf, const_rtx x, int } } /* print_value */ +/* Prints rtxes, I customarily classified as values. They're + constants, registers, labels, symbols and memory accesses. Print + them to file F. */ + +void +print_value_slim (FILE *f, const_rtx x, int verbose) +{ + char buf[BUF_LEN]; + + print_value (buf, x, verbose); + fprintf (f, "%s", buf); +} + /* The next step in insn detalization, its pattern recognition. */ void