* include/bits/atomic_futex.h [_GLIBCXX_HAVE_LINUX_FUTEX]
[official-gcc.git] / gcc / sel-sched-dump.h
blob5f77a087d17b4006650ec016324bd7312bf97e9e
1 /* Instruction scheduling pass. Log dumping infrastructure.
2 Copyright (C) 2006-2015 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/>. */
21 #ifndef GCC_SEL_SCHED_DUMP_H
22 #define GCC_SEL_SCHED_DUMP_H
26 /* These values control the dumping of control flow graph to the .dot file. */
27 enum sel_dump_cfg_def
29 /* Dump only current region. */
30 SEL_DUMP_CFG_CURRENT_REGION = 2,
32 /* Dump note_list for this bb. */
33 SEL_DUMP_CFG_BB_NOTES_LIST = 4,
35 /* Dump availability set from the bb header. */
36 SEL_DUMP_CFG_AV_SET = 8,
38 /* Dump liveness set from the bb header. */
39 SEL_DUMP_CFG_LV_SET = 16,
41 /* Dump insns of the given block. */
42 SEL_DUMP_CFG_BB_INSNS = 32,
44 /* Show current fences when dumping cfg. */
45 SEL_DUMP_CFG_FENCES = 64,
47 /* Show insn's seqnos when dumping cfg. */
48 SEL_DUMP_CFG_INSN_SEQNO = 128,
50 /* Dump function name when dumping cfg. */
51 SEL_DUMP_CFG_FUNCTION_NAME = 256,
53 /* Dump loop father number of the given bb. */
54 SEL_DUMP_CFG_BB_LOOP = 512,
56 /* The default flags for cfg dumping. */
57 SEL_DUMP_CFG_FLAGS = (SEL_DUMP_CFG_CURRENT_REGION
58 | SEL_DUMP_CFG_BB_NOTES_LIST
59 | SEL_DUMP_CFG_AV_SET
60 | SEL_DUMP_CFG_LV_SET
61 | SEL_DUMP_CFG_BB_INSNS
62 | SEL_DUMP_CFG_FENCES
63 | SEL_DUMP_CFG_INSN_SEQNO
64 | SEL_DUMP_CFG_BB_LOOP)
67 /* These values control the dumping of insns containing in expressions. */
68 enum dump_insn_rtx_def
70 /* Dump insn's UID. */
71 DUMP_INSN_RTX_UID = 2,
73 /* Dump insn's pattern. */
74 DUMP_INSN_RTX_PATTERN = 4,
76 /* Dump insn's basic block number. */
77 DUMP_INSN_RTX_BBN = 8,
79 /* Dump all of the above. */
80 DUMP_INSN_RTX_ALL = (DUMP_INSN_RTX_UID | DUMP_INSN_RTX_PATTERN
81 | DUMP_INSN_RTX_BBN)
84 extern void dump_insn_rtx_1 (rtx, int);
85 extern void dump_insn_rtx (rtx);
86 extern void debug_insn_rtx (rtx);
88 /* These values control dumping of vinsns. The meaning of different fields
89 of a vinsn is explained in sel-sched-ir.h. */
90 enum dump_vinsn_def
92 /* Dump the insn behind this vinsn. */
93 DUMP_VINSN_INSN_RTX = 2,
95 /* Dump vinsn's type. */
96 DUMP_VINSN_TYPE = 4,
98 /* Dump vinsn's count. */
99 DUMP_VINSN_COUNT = 8,
101 /* Dump the cost (default latency) of the insn behind this vinsn. */
102 DUMP_VINSN_COST = 16,
104 /* Dump all of the above. */
105 DUMP_VINSN_ALL = (DUMP_VINSN_INSN_RTX | DUMP_VINSN_TYPE | DUMP_VINSN_COUNT
106 | DUMP_VINSN_COST)
109 extern void dump_vinsn_1 (vinsn_t, int);
110 extern void dump_vinsn (vinsn_t);
111 extern void debug_vinsn (vinsn_t);
113 extern void debug (vinsn_def &ref);
114 extern void debug (vinsn_def *ptr);
115 extern void debug_verbose (vinsn_def &ref);
116 extern void debug_verbose (vinsn_def *ptr);
119 /* These values control dumping of expressions. The meaning of the fields
120 is explained in sel-sched-ir.h. */
121 enum dump_expr_def
123 /* Dump the vinsn behind this expression. */
124 DUMP_EXPR_VINSN = 2,
126 /* Dump expression's SPEC parameter. */
127 DUMP_EXPR_SPEC = 4,
129 /* Dump expression's priority. */
130 DUMP_EXPR_PRIORITY = 8,
132 /* Dump the number of times this expression was scheduled. */
133 DUMP_EXPR_SCHED_TIMES = 16,
135 /* Dump speculative status of the expression. */
136 DUMP_EXPR_SPEC_DONE_DS = 32,
138 /* Dump the basic block number which originated this expression. */
139 DUMP_EXPR_ORIG_BB = 64,
141 /* Dump expression's usefulness. */
142 DUMP_EXPR_USEFULNESS = 128,
144 /* Dump all of the above. */
145 DUMP_EXPR_ALL = (DUMP_EXPR_VINSN | DUMP_EXPR_SPEC | DUMP_EXPR_PRIORITY
146 | DUMP_EXPR_SCHED_TIMES | DUMP_EXPR_SPEC_DONE_DS
147 | DUMP_EXPR_ORIG_BB | DUMP_EXPR_USEFULNESS)
150 extern void dump_expr_1 (expr_t, int);
151 extern void dump_expr (expr_t);
152 extern void debug_expr (expr_t);
154 extern void debug (expr_def &ref);
155 extern void debug (expr_def *ptr);
156 extern void debug_verbose (expr_def &ref);
157 extern void debug_verbose (expr_def *ptr);
160 /* A enumeration for dumping flags of an insn. The difference from
161 dump_insn_rtx_def is that these fields are for insns in stream only. */
162 enum dump_insn_def
164 /* Dump expression of this insn. */
165 DUMP_INSN_EXPR = 2,
167 /* Dump insn's seqno. */
168 DUMP_INSN_SEQNO = 4,
170 /* Dump the cycle on which insn was scheduled. */
171 DUMP_INSN_SCHED_CYCLE = 8,
173 /* Dump insn's UID. */
174 DUMP_INSN_UID = 16,
176 /* Dump insn's pattern. */
177 DUMP_INSN_PATTERN = 32,
179 /* Dump insn's basic block number. */
180 DUMP_INSN_BBN = 64,
182 /* Dump all of the above. */
183 DUMP_INSN_ALL = (DUMP_INSN_EXPR | DUMP_INSN_SEQNO | DUMP_INSN_BBN
184 | DUMP_INSN_SCHED_CYCLE | DUMP_INSN_UID | DUMP_INSN_PATTERN)
187 extern void dump_insn_1 (insn_t, int);
188 extern void dump_insn (insn_t);
189 extern void debug_insn (insn_t);
191 /* When this flag is on, we are dumping to the .dot file.
192 When it is off, we are dumping to log. */
193 extern bool sched_dump_to_dot_p;
196 /* Functions from sel-sched-dump.c. */
197 extern void sel_print (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
198 extern const char * sel_print_insn (const rtx_insn *, int);
199 extern void free_sel_dump_data (void);
201 extern void block_start (void);
202 extern void block_finish (void);
203 extern int get_print_blocks_num (void);
204 extern void line_start (void);
205 extern void line_finish (void);
207 extern void sel_print_rtl (rtx x);
208 extern void dump_insn_1 (insn_t, int);
209 extern void dump_insn (insn_t);
210 extern void dump_insn_vector (rtx_vec_t);
211 extern void dump_expr (expr_t);
212 extern void dump_used_regs (bitmap);
213 extern void dump_av_set (av_set_t);
214 extern void dump_lv_set (regset);
215 extern void dump_blist (blist_t);
216 extern void dump_flist (flist_t);
217 extern void dump_hard_reg_set (const char *, HARD_REG_SET);
218 extern void sel_debug_cfg_1 (int);
219 extern void sel_debug_cfg (void);
220 extern void setup_dump_cfg_params (void);
222 /* Debug functions. */
223 extern void debug_expr (expr_t);
224 extern void debug_av_set (av_set_t);
225 extern void debug_lv_set (regset);
226 extern void debug_ilist (ilist_t);
227 extern void debug_blist (blist_t);
228 extern void debug (vec<rtx> &ref);
229 extern void debug (vec<rtx> *ptr);
230 extern void debug_insn_vector (rtx_vec_t);
231 extern void debug_hard_reg_set (HARD_REG_SET);
232 extern rtx debug_mem_addr_value (rtx);
233 #endif