2 Copyright (C) 1987-2016 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef GCC_PRINT_RTL_H
21 #define GCC_PRINT_RTL_H
23 /* A class for writing rtx to a FILE *. */
28 rtx_writer (FILE *outfile
, int ind
, bool simple
, bool compact
);
30 void print_rtx (const_rtx in_rtx
);
31 void print_rtl (const_rtx rtx_first
);
32 int print_rtl_single_with_indent (const_rtx x
, int ind
);
34 void finish_directive ();
37 void print_rtx_operand_code_0 (const_rtx in_rtx
, int idx
);
38 void print_rtx_operand_code_e (const_rtx in_rtx
, int idx
);
39 void print_rtx_operand_codes_E_and_V (const_rtx in_rtx
, int idx
);
40 void print_rtx_operand_code_i (const_rtx in_rtx
, int idx
);
41 void print_rtx_operand_code_r (const_rtx in_rtx
);
42 void print_rtx_operand_code_u (const_rtx in_rtx
, int idx
);
43 void print_rtx_operand (const_rtx in_rtx
, int idx
);
44 bool operand_has_default_value_p (const_rtx in_rtx
, int idx
);
50 bool m_in_call_function_usage
;
52 /* True means use simplified format without flags, modes, etc. */
55 /* If true, use compact dump format:
56 - PREV/NEXT_INSN UIDs are omitted
57 - INSN_CODEs are omitted,
58 - register numbers are omitted for hard and virtual regs, and
59 non-virtual pseudos are offset relative to the first such reg, and
60 printed with a '%' sigil e.g. "%0" for (LAST_VIRTUAL_REGISTER + 1),
61 - insn names are prefixed with "c" (e.g. "cinsn", "cnote", etc). */
66 extern void print_rtl (FILE *, const_rtx
);
68 extern void print_rtx_insn_vec (FILE *file
, const vec
<rtx_insn
*> &vec
);
70 extern void dump_value_slim (FILE *, const_rtx
, int);
71 extern void dump_insn_slim (FILE *, const rtx_insn
*);
72 extern void dump_rtl_slim (FILE *, const rtx_insn
*, const rtx_insn
*,
74 extern void print_value (pretty_printer
*, const_rtx
, int);
75 extern void print_pattern (pretty_printer
*, const_rtx
, int);
76 extern void print_insn (pretty_printer
*pp
, const rtx_insn
*x
, int verbose
);
78 extern void rtl_dump_bb_for_graph (pretty_printer
*, basic_block
);
79 extern const char *str_pattern_slim (const_rtx
);
81 extern void print_rtx_function (FILE *file
, function
*fn
, bool compact
);
83 #endif // GCC_PRINT_RTL_H