* g++.dg/debug/dwarf2/ref-3.C: XFAIL AIX.
[official-gcc.git] / gcc / print-rtl.h
blob8496ffa1491f158a2074d9d6475d257bea48bb4f
1 /* Print RTL for GCC.
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
9 version.
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
14 for more details.
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 *. */
25 class rtx_writer
27 public:
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 private:
35 void print_rtx_operand_code_0 (const_rtx in_rtx, int idx);
36 void print_rtx_operand_code_e (const_rtx in_rtx, int idx);
37 void print_rtx_operand_codes_E_and_V (const_rtx in_rtx, int idx);
38 void print_rtx_operand_code_i (const_rtx in_rtx, int idx);
39 void print_rtx_operand_code_r (const_rtx in_rtx);
40 void print_rtx_operand_code_u (const_rtx in_rtx, int idx);
41 void print_rtx_operand (const_rtx in_rtx, int idx);
43 private:
44 FILE *m_outfile;
45 int m_sawclose;
46 int m_indent;
47 bool m_in_call_function_usage;
49 /* True means use simplified format without flags, modes, etc. */
50 bool m_simple;
52 /* If true, use compact dump format:
53 - PREV/NEXT_INSN UIDs are omitted
54 - INSN_CODEs are omitted,
55 - register numbers are omitted for hard and virtual regs, and
56 non-virtual pseudos are offset relative to the first such reg, and
57 printed with a '%' sigil e.g. "%0" for (LAST_VIRTUAL_REGISTER + 1),
58 - insn names are prefixed with "c" (e.g. "cinsn", "cnote", etc). */
59 bool m_compact;
62 #ifdef BUFSIZ
63 extern void print_rtl (FILE *, const_rtx);
64 #endif
65 extern void print_rtx_insn_vec (FILE *file, const vec<rtx_insn *> &vec);
67 extern void dump_value_slim (FILE *, const_rtx, int);
68 extern void dump_insn_slim (FILE *, const rtx_insn *);
69 extern void dump_rtl_slim (FILE *, const rtx_insn *, const rtx_insn *,
70 int, int);
71 extern void print_value (pretty_printer *, const_rtx, int);
72 extern void print_pattern (pretty_printer *, const_rtx, int);
73 extern void print_insn (pretty_printer *pp, const rtx_insn *x, int verbose);
75 extern void rtl_dump_bb_for_graph (pretty_printer *, basic_block);
76 extern const char *str_pattern_slim (const_rtx);
78 extern void print_rtx_function (FILE *file, function *fn, bool compact);
80 #endif // GCC_PRINT_RTL_H