GCC Middle and Back End API Reference
dumpfile.h
Go to the documentation of this file.
1/* Definitions for the shared dumpfile.
2 Copyright (C) 2004-2024 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20
21#ifndef GCC_DUMPFILE_H
22#define GCC_DUMPFILE_H 1
23
24#include "profile-count.h"
25
26/* An attribute for annotating formatting printing functions that use
27 the dumpfile/optinfo formatting codes. These are the pretty_printer
28 format codes (see pretty-print.cc), with additional codes for middle-end
29 specific entities (see dumpfile.cc). */
30
31#if GCC_VERSION >= 9000
32#define ATTRIBUTE_GCC_DUMP_PRINTF(m, n) \
33 __attribute__ ((__format__ (__gcc_dump_printf__, m ,n))) \
34 ATTRIBUTE_NONNULL(m)
35#else
36#define ATTRIBUTE_GCC_DUMP_PRINTF(m, n) ATTRIBUTE_NONNULL(m)
37#endif
38
39/* Different tree dump places. When you add new tree dump places,
40 extend the DUMP_FILES array in dumpfile.cc. */
42{
43 TDI_none, /* No dump */
44 TDI_cgraph, /* dump function call graph. */
45 TDI_inheritance, /* dump type inheritance graph. */
46 TDI_clones, /* dump IPA cloning decisions. */
47 TDI_original, /* dump each function before optimizing it */
48 TDI_gimple, /* dump each function after gimplifying it */
49 TDI_nested, /* dump each function after unnesting it */
50 TDI_lto_stream_out, /* dump information about lto streaming */
51 TDI_profile_report, /* dump information about profile quality */
52
53 TDI_lang_all, /* enable all the language dumps. */
54 TDI_tree_all, /* enable all the GENERIC/GIMPLE dumps. */
55 TDI_rtl_all, /* enable all the RTL dumps. */
56 TDI_ipa_all, /* enable all the IPA dumps. */
57
59};
60
61/* Enum used to distinguish dump files to types. */
62
71
72/* Bit masks to control dumping. Not all values are applicable to all
73 dumps. Add new ones at the end. When you define new values, extend
74 the DUMP_OPTIONS array in dumpfile.cc. The TDF_* flags coexist with
75 MSG_* flags (for -fopt-info) and the bit values must be chosen to
76 allow that. */
77enum dump_flag : uint32_t
78{
79 /* Value of TDF_NONE is used just for bits filtered by TDF_KIND_MASK. */
81
82 /* Dump node addresses. */
83 TDF_ADDRESS = (1 << 0),
84
85 /* Don't go wild following links. */
86 TDF_SLIM = (1 << 1),
87
88 /* Don't unparse the function. */
89 TDF_RAW = (1 << 2),
90
91 /* Show more detailed info about each pass. */
92 TDF_DETAILS = (1 << 3),
93
94 /* Dump various statistics about each pass. */
95 TDF_STATS = (1 << 4),
96
97 /* Display basic block boundaries. */
98 TDF_BLOCKS = (1 << 5),
99
100 /* Display virtual operands. */
101 TDF_VOPS = (1 << 6),
102
103 /* Display statement line numbers. */
104 TDF_LINENO = (1 << 7),
105
106 /* Display decl UIDs. */
107 TDF_UID = (1 << 8),
108
109 /* Address of stmt. */
110 TDF_STMTADDR = (1 << 9),
111
112 /* A graph dump is being emitted. */
113 TDF_GRAPH = (1 << 10),
114
115 /* Display memory symbols in expr.
116 Implies TDF_VOPS. */
117 TDF_MEMSYMS = (1 << 11),
118
119 /* A flag to only print the RHS of a gimple stmt. */
120 TDF_RHS_ONLY = (1 << 12),
121
122 /* Display asm names of decls. */
123 TDF_ASMNAME = (1 << 13),
124
125 /* Display EH region number holding this gimple statement. */
126 TDF_EH = (1 << 14),
127
128 /* Omit UIDs from dumps. */
129 TDF_NOUID = (1 << 15),
130
131 /* Display alias information. */
132 TDF_ALIAS = (1 << 16),
133
134 /* Enumerate locals by uid. */
136
137 /* Dump cselib details. */
138 TDF_CSELIB = (1 << 18),
139
140 /* Dump SCEV details. */
141 TDF_SCEV = (1 << 19),
142
143 /* Dump in GIMPLE FE syntax. */
144 TDF_GIMPLE = (1 << 20),
145
146 /* Dump folding details. */
147 TDF_FOLDING = (1 << 21),
148
149 /* MSG_* flags for expressing the kinds of message to
150 be emitted by -fopt-info. */
151
152 /* -fopt-info optimized sources. */
154
155 /* Missed opportunities. */
157
158 /* General optimization info. */
159 MSG_NOTE = (1 << 24),
160
161 /* Mask for selecting MSG_-kind flags. */
165
166 /* MSG_PRIORITY_* flags for expressing the priority levels of message
167 to be emitted by -fopt-info, and filtering on them.
168 By default, messages at the top-level dump scope are "user-facing",
169 whereas those that are in nested scopes are implicitly "internals".
170 This behavior can be overridden for a given dump message by explicitly
171 specifying one of the MSG_PRIORITY_* flags.
172
173 By default, dump files show both kinds of message, whereas -fopt-info
174 only shows "user-facing" messages, and requires the "-internals"
175 sub-option of -fopt-info to show the internal messages. */
176
177 /* Implicitly supplied for messages at the top-level dump scope. */
179
180 /* Implicitly supplied for messages within nested dump scopes. */
182
183 /* Supplied when an opt_problem generated in a nested scope is re-emitted
184 at the top-level. We want to default to showing these in -fopt-info
185 output, but to *not* show them in dump files, as the message would be
186 shown twice, messing up "scan-tree-dump-times" in DejaGnu tests. */
188
189 /* Mask for selecting MSG_PRIORITY_* flags. */
193
194 /* All -fdump- flags. */
195 TDF_ALL_VALUES = (1 << 28) - 1,
196
197 /* Dumping for -fcompare-debug. */
198 TDF_COMPARE_DEBUG = (1 << 28),
199
200 /* Dump a GIMPLE value which means wrapping certain things with _Literal. */
201 TDF_GIMPLE_VAL = (1 << 29),
202
203 /* For error. */
204 TDF_ERROR = ((uint32_t)1 << 30),
205};
206
207/* Dump flags type. */
208
210
211inline dump_flags_t
213{
214 return (dump_flags_t)((std::underlying_type<dump_flags_t>::type)lhs
215 | (std::underlying_type<dump_flags_t>::type)rhs);
216}
217
218inline dump_flags_t
220{
221 return (dump_flags_t)((std::underlying_type<dump_flags_t>::type)lhs
222 & (std::underlying_type<dump_flags_t>::type)rhs);
223}
224
225inline dump_flags_t
227{
228 return (dump_flags_t)~((std::underlying_type<dump_flags_t>::type)flags);
229}
230
231inline dump_flags_t &
233{
234 lhs = (dump_flags_t)((std::underlying_type<dump_flags_t>::type)lhs
235 | (std::underlying_type<dump_flags_t>::type)rhs);
236 return lhs;
237}
238
239inline dump_flags_t &
241{
242 lhs = (dump_flags_t)((std::underlying_type<dump_flags_t>::type)lhs
243 & (std::underlying_type<dump_flags_t>::type)rhs);
244 return lhs;
245}
246
247/* Flags to control high-level -fopt-info dumps. Usually these flags
248 define a group of passes. An optimization pass can be part of
249 multiple groups. */
250
252{
254
255 /* IPA optimization passes */
256 OPTGROUP_IPA = (1 << 1),
257
258 /* Loop optimization passes */
259 OPTGROUP_LOOP = (1 << 2),
260
261 /* Inlining passes */
262 OPTGROUP_INLINE = (1 << 3),
263
264 /* OMP (Offloading and Multi Processing) transformations */
265 OPTGROUP_OMP = (1 << 4),
266
267 /* Vectorization passes */
268 OPTGROUP_VEC = (1 << 5),
269
270 /* All other passes */
271 OPTGROUP_OTHER = (1 << 6),
272
276
278
279inline optgroup_flags_t
281{
282 return (optgroup_flags_t)((std::underlying_type<dump_flags_t>::type)lhs
283 | (std::underlying_type<dump_flags_t>::type)rhs);
284}
285
286inline optgroup_flags_t &
288{
289 lhs = (optgroup_flags_t)((std::underlying_type<dump_flags_t>::type)lhs
290 | (std::underlying_type<dump_flags_t>::type)rhs);
291 return lhs;
292}
293
294/* Define a tree dump switch. */
296{
297 /* Suffix to give output file. */
298 const char *suffix;
299 /* Command line dump switch. */
300 const char *swtch;
301 /* Command line glob. */
302 const char *glob;
303 /* Filename for the pass-specific stream. */
304 const char *pfilename;
305 /* Filename for the -fopt-info stream. */
306 const char *alt_filename;
307 /* Pass-specific dump stream. */
308 FILE *pstream;
309 /* -fopt-info stream. */
311 /* Dump kind. */
313 /* Dump flags. */
315 /* A pass flags for -fopt-info. */
317 /* Flags for -fopt-info given by a user. */
319 /* State of pass-specific stream. */
321 /* State of the -fopt-info stream. */
323 /* Dump file number. */
324 int num;
325 /* Fields "suffix", "swtch", "glob" can be const strings,
326 or can be dynamically allocated, needing free. */
328 /* When a given dump file is being initialized, this flag is set to true
329 if the corresponding TDF_graph dump file has also been initialized. */
331};
332
333/* A class for describing where in the user's source that a dump message
334 relates to, with various constructors for convenience.
335 In particular, this lets us associate dump messages
336 with hotness information (e.g. from PGO), allowing them to
337 be prioritized by code hotness. */
338
340{
341 public:
342 /* Default constructor, analogous to UNKNOWN_LOCATION. */
344
345 /* Construct from a gimple statement (using its location and hotness). */
346 dump_user_location_t (const gimple *stmt);
347
348 /* Construct from an RTL instruction (using its location and hotness). */
349 dump_user_location_t (const rtx_insn *insn);
350
351 /* Construct from a location_t. This one is deprecated (since it doesn't
352 capture hotness information); it thus needs to be spelled out. */
354 from_location_t (location_t loc)
355 {
356 return dump_user_location_t (profile_count (), loc);
357 }
358
359 /* Construct from a function declaration. This one requires spelling out
360 to avoid accidentally constructing from other kinds of tree. */
362 from_function_decl (tree fndecl);
363
364 profile_count get_count () const { return m_count; }
365 location_t get_location_t () const { return m_loc; }
366
367 private:
368 /* Private ctor from count and location, for use by from_location_t. */
370 : m_count (count), m_loc (loc)
371 {}
372
374 location_t m_loc;
375};
376
377/* A class for identifying where in the compiler's own source
378 (or a plugin) that a dump message is being emitted from. */
379
381{
382public:
384#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
385 const char *file = __builtin_FILE (),
386 int line = __builtin_LINE (),
387 const char *function = __builtin_FUNCTION ()
388#else
389 const char *file = __FILE__,
390 int line = __LINE__,
391 const char *function = NULL
392#endif
393 )
394 : m_file (file), m_line (line), m_function (function)
395 {}
396
397 const char *m_file;
399 const char *m_function;
400};
401
402/* A bundle of metadata for describing a dump message:
403 (a) the dump_flags
404 (b) the source location within the compiler/plugin.
405
406 The constructors use default parameters so that (b) gets sets up
407 automatically.
408
409 Hence you can pass in e.g. MSG_NOTE, and the dump call
410 will automatically record where in GCC's source code the
411 dump was emitted from. */
412
414{
415 public:
417 const dump_impl_location_t &impl_location
420 m_impl_location (impl_location)
421 {
422 }
423
425
428
429 private:
432};
433
434/* A bundle of information for describing the location of a dump message:
435 (a) the source location and hotness within the user's code, together with
436 (b) the source location within the compiler/plugin.
437
438 The constructors use default parameters so that (b) gets sets up
439 automatically.
440
441 The upshot is that you can pass in e.g. a gimple * to dump_printf_loc,
442 and the dump call will automatically record where in GCC's source
443 code the dump was emitted from. */
444
446{
447 public:
448 /* Default constructor, analogous to UNKNOWN_LOCATION. */
452 m_impl_location (impl_location)
453 {
454 }
455
456 /* Construct from a gimple statement (using its location and hotness). */
458 const dump_impl_location_t &impl_location
461 m_impl_location (impl_location)
462 {
463 }
464
465 /* Construct from an RTL instruction (using its location and hotness). */
467 const dump_impl_location_t &impl_location
470 m_impl_location (impl_location)
471 {
472 }
473
474 /* Construct from a dump_user_location_t. */
476 const dump_impl_location_t &impl_location
478 : m_user_location (user_location),
479 m_impl_location (impl_location)
480 {
481 }
482
483 /* Construct from a location_t. This one is deprecated (since it doesn't
484 capture hotness information), and thus requires spelling out. */
485 static dump_location_t
486 from_location_t (location_t loc,
487 const dump_impl_location_t &impl_location
489 {
491 impl_location);
492 }
493
496
499
500 location_t get_location_t () const
501 {
503 }
504
506
507 private:
510};
511
512/* In dumpfile.cc */
513extern FILE *dump_begin (int, dump_flags_t *, int part=-1);
514extern void dump_end (int, FILE *);
515extern int opt_info_switch_p (const char *);
516extern const char *dump_flag_name (int);
518extern dump_flags_t
519parse_dump_option (const char *, const char **);
520
521/* Global variables used to communicate with passes. */
522extern FILE *dump_file;
524extern const char *dump_file_name;
525
526extern bool dumps_are_enabled;
527
528extern void set_dump_file (FILE *new_dump_file);
529
530/* Return true if any of the dumps is enabled, false otherwise. */
531inline bool
533{
534 return dumps_are_enabled;
535}
536
537/* The following API calls (which *don't* take a "FILE *")
538 write the output to zero or more locations.
539
540 Some destinations are written to immediately as dump_* calls
541 are made; for others, the output is consolidated into an "optinfo"
542 instance (with its own metadata), and only emitted once the optinfo
543 is complete.
544
545 The destinations are:
546
547 (a) the "immediate" destinations:
548 (a.1) the active dump_file, if any
549 (a.2) the -fopt-info destination, if any
550 (b) the "optinfo" destinations, if any:
551 (b.1) as optimization records
552
553 dump_* (MSG_*) --> dumpfile.cc --> items --> (a.1) dump_file
554 | `-> (a.2) alt_dump_file
555 |
556 `--> (b) optinfo
557 `---> optinfo destinations
558 (b.1) optimization records
559
560 For optinfos, the dump_*_loc mark the beginning of an optinfo
561 instance: all subsequent dump_* calls are consolidated into
562 that optinfo, until the next dump_*_loc call (or a change in
563 dump scope, or a call to dumpfile_ensure_any_optinfo_are_flushed).
564
565 A group of dump_* calls should be guarded by:
566
567 if (dump_enabled_p ())
568
569 to minimize the work done for the common case where dumps
570 are disabled. */
571
572extern void dump_printf (const dump_metadata_t &, const char *, ...)
574
576 const char *, ...)
578extern void dump_function (int phase, tree fn);
579extern void dump_basic_block (dump_flags_t, basic_block, int);
580extern void dump_generic_expr_loc (const dump_metadata_t &,
581 const dump_user_location_t &,
583extern void dump_generic_expr (const dump_metadata_t &, dump_flags_t, tree);
584extern void dump_gimple_stmt_loc (const dump_metadata_t &,
585 const dump_user_location_t &,
586 dump_flags_t, gimple *, int);
587extern void dump_gimple_stmt (const dump_metadata_t &, dump_flags_t, gimple *, int);
588extern void dump_gimple_expr_loc (const dump_metadata_t &,
589 const dump_user_location_t &,
590 dump_flags_t, gimple *, int);
591extern void dump_gimple_expr (const dump_metadata_t &, dump_flags_t, gimple *, int);
592extern void dump_symtab_node (const dump_metadata_t &, symtab_node *);
593
594template<unsigned int N, typename C>
595void dump_dec (const dump_metadata_t &, const poly_int<N, C> &);
596extern void dump_dec (dump_flags_t, const poly_wide_int &, signop);
597extern void dump_hex (dump_flags_t, const poly_wide_int &);
598
600
601/* Managing nested scopes, so that dumps can express the call chain
602 leading to a dump message. */
603
604extern unsigned int get_dump_scope_depth ();
605extern void dump_begin_scope (const char *name,
606 const dump_user_location_t &user_location,
607 const dump_impl_location_t &impl_location);
608extern void dump_end_scope ();
609
610/* Implementation detail of the AUTO_DUMP_SCOPE macro below.
611
612 A RAII-style class intended to make it easy to emit dump
613 information about entering and exiting a collection of nested
614 function calls. */
615
617{
618 public:
619 auto_dump_scope (const char *name,
620 const dump_user_location_t &user_location,
621 const dump_impl_location_t &impl_location
623 {
624 if (dump_enabled_p ())
625 dump_begin_scope (name, user_location, impl_location);
626 }
628 {
629 if (dump_enabled_p ())
631 }
632};
633
634/* A macro for calling:
635 dump_begin_scope (NAME, USER_LOC);
636 via an RAII object, thus printing "=== MSG ===\n" to the dumpfile etc,
637 and then calling
638 dump_end_scope ();
639 once the object goes out of scope, thus capturing the nesting of
640 the scopes.
641
642 These scopes affect dump messages within them: dump messages at the
643 top level implicitly default to MSG_PRIORITY_USER_FACING, whereas those
644 in a nested scope implicitly default to MSG_PRIORITY_INTERNALS. */
645
646#define AUTO_DUMP_SCOPE(NAME, USER_LOC) \
647 auto_dump_scope scope (NAME, USER_LOC)
648
649extern void dump_function (int phase, tree fn);
650extern bool enable_rtl_dump_file (void);
651
652/* In tree-dump.cc */
653extern void dump_node (const_tree, dump_flags_t, FILE *);
654
655/* In cfghooks.cc */
656extern void dump_bb (FILE *, basic_block, int, dump_flags_t);
657
658class opt_pass;
659
660namespace gcc {
661
662/* A class for managing all of the various dump files used by the
663 optimization passes. */
664
666{
667public:
668
669 dump_manager ();
670 ~dump_manager ();
671
672 /* Register a dumpfile.
673
674 TAKE_OWNERSHIP determines whether callee takes ownership of strings
675 SUFFIX, SWTCH, and GLOB. */
676 unsigned int
677 dump_register (const char *suffix, const char *swtch, const char *glob,
678 dump_kind dkind, optgroup_flags_t optgroup_flags,
679 bool take_ownership);
680
681 /* Allow languages and middle-end to register their dumps before the
682 optimization passes. */
683 void
685
686 /* Return the dump_file_info for the given phase. */
687 struct dump_file_info *
688 get_dump_file_info (int phase) const;
689
690 struct dump_file_info *
691 get_dump_file_info_by_switch (const char *swtch) const;
692
693 /* Return the name of the dump file for the given phase.
694 If the dump is not enabled, returns NULL. */
695 char *
696 get_dump_file_name (int phase, int part = -1) const;
697
698 char *
699 get_dump_file_name (struct dump_file_info *dfi, int part = -1) const;
700
701 void
702 dump_switch_p (const char *arg);
703
704 /* Start a dump for PHASE. Store user-supplied dump flags in
705 *FLAG_PTR. Return the number of streams opened. Set globals
706 DUMP_FILE, and ALT_DUMP_FILE to point to the opened streams, and
707 set dump_flags appropriately for both pass dump stream and
708 -fopt-info stream. */
709 int
710 dump_start (int phase, dump_flags_t *flag_ptr);
711
712 /* Finish a tree dump for PHASE and close associated dump streams. Also
713 reset the globals DUMP_FILE, ALT_DUMP_FILE, and DUMP_FLAGS. */
714 void
715 dump_finish (int phase);
716
717 FILE *
718 dump_begin (int phase, dump_flags_t *flag_ptr, int part);
719
720 /* Returns nonzero if tree dump PHASE has been initialized. */
721 int
722 dump_initialized_p (int phase) const;
723
724 /* Returns the switch name of PHASE. */
725 const char *
726 dump_flag_name (int phase) const;
727
728 void register_pass (opt_pass *pass);
729
730private:
731
732 int
733 dump_phase_enabled_p (int phase) const;
734
735 int
736 dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob);
737
738 int
739 dump_enable_all (dump_kind dkind, dump_flags_t flags, const char *filename);
740
741 int
743 const char *filename);
744
745 bool update_dfi_for_opt_info (dump_file_info *dfi) const;
746
747private:
748
749 /* Dynamically registered dump files and switches. */
754
755 /* Stored values from -fopt-info, for handling passes created after
756 option-parsing (by backends and by plugins). */
760
761 /* Grant access to dump_enable_all. */
762 friend bool ::enable_rtl_dump_file (void);
763
764 /* Grant access to opt_info_enable_passes. */
765 friend int ::opt_info_switch_p (const char *arg);
766
767}; // class dump_manager
768
769} // namespace gcc
770
771#endif /* GCC_DUMPFILE_H */
Definition dumpfile.h:617
~auto_dump_scope()
Definition dumpfile.h:627
auto_dump_scope(const char *name, const dump_user_location_t &user_location, const dump_impl_location_t &impl_location=dump_impl_location_t())
Definition dumpfile.h:619
Definition dumpfile.h:381
const char * m_function
Definition dumpfile.h:399
dump_impl_location_t(const char *file=__FILE__, int line=__LINE__, const char *function=NULL)
Definition dumpfile.h:383
const char * m_file
Definition dumpfile.h:397
int m_line
Definition dumpfile.h:398
Definition dumpfile.h:446
dump_impl_location_t m_impl_location
Definition dumpfile.h:509
const dump_user_location_t & get_user_location() const
Definition dumpfile.h:495
dump_location_t(const rtx_insn *insn, const dump_impl_location_t &impl_location=dump_impl_location_t())
Definition dumpfile.h:466
static dump_location_t from_location_t(location_t loc, const dump_impl_location_t &impl_location=dump_impl_location_t())
Definition dumpfile.h:486
location_t get_location_t() const
Definition dumpfile.h:500
const dump_impl_location_t & get_impl_location() const
Definition dumpfile.h:498
dump_location_t(const dump_impl_location_t &impl_location=dump_impl_location_t())
Definition dumpfile.h:449
dump_location_t(const gimple *stmt, const dump_impl_location_t &impl_location=dump_impl_location_t())
Definition dumpfile.h:457
dump_user_location_t m_user_location
Definition dumpfile.h:508
profile_count get_count() const
Definition dumpfile.h:505
dump_location_t(const dump_user_location_t &user_location, const dump_impl_location_t &impl_location=dump_impl_location_t())
Definition dumpfile.h:475
Definition dumpfile.h:414
dump_flags_t m_dump_flags
Definition dumpfile.h:430
const dump_impl_location_t & get_impl_location() const
Definition dumpfile.h:427
dump_metadata_t(dump_flags_t dump_flags, const dump_impl_location_t &impl_location=dump_impl_location_t())
Definition dumpfile.h:416
dump_flags_t get_dump_flags() const
Definition dumpfile.h:424
dump_impl_location_t m_impl_location
Definition dumpfile.h:431
Definition dumpfile.h:340
location_t get_location_t() const
Definition dumpfile.h:365
static dump_user_location_t from_location_t(location_t loc)
Definition dumpfile.h:354
dump_user_location_t(profile_count count, location_t loc)
Definition dumpfile.h:369
location_t m_loc
Definition dumpfile.h:374
profile_count get_count() const
Definition dumpfile.h:364
static dump_user_location_t from_function_decl(tree fndecl)
Definition dumpfile.cc:439
dump_user_location_t()
Definition dumpfile.h:343
profile_count m_count
Definition dumpfile.h:373
Definition dumpfile.h:666
FILE * dump_begin(int phase, dump_flags_t *flag_ptr, int part)
Definition dumpfile.cc:1546
int dump_phase_enabled_p(int phase) const
Definition dumpfile.cc:1577
optgroup_flags_t m_optgroup_flags
Definition dumpfile.h:757
struct dump_file_info * get_dump_file_info_by_switch(const char *swtch) const
Definition dumpfile.cc:292
int dump_switch_p_1(const char *arg, struct dump_file_info *dfi, bool doglob)
Definition dumpfile.cc:1855
size_t m_extra_dump_files_alloced
Definition dumpfile.h:753
int dump_enable_all(dump_kind dkind, dump_flags_t flags, const char *filename)
Definition dumpfile.cc:1682
char * m_optinfo_filename
Definition dumpfile.h:759
bool update_dfi_for_opt_info(dump_file_info *dfi) const
Definition dumpfile.cc:1762
void register_dumps()
Definition dumpfile.cc:259
int opt_info_enable_passes(optgroup_flags_t optgroup_flags, dump_flags_t flags, const char *filename)
Definition dumpfile.cc:1738
void dump_finish(int phase)
Definition dumpfile.cc:1509
unsigned int dump_register(const char *suffix, const char *swtch, const char *glob, dump_kind dkind, optgroup_flags_t optgroup_flags, bool take_ownership)
Definition dumpfile.cc:215
int dump_initialized_p(int phase) const
Definition dumpfile.cc:1601
const char * dump_flag_name(int phase) const
Definition dumpfile.cc:1617
struct dump_file_info * m_extra_dump_files
Definition dumpfile.h:751
int m_next_dump
Definition dumpfile.h:750
dump_manager()
Definition dumpfile.cc:180
struct dump_file_info * get_dump_file_info(int phase) const
Definition dumpfile.cc:277
size_t m_extra_dump_files_in_use
Definition dumpfile.h:752
void register_pass(opt_pass *pass)
Definition dumpfile.cc:1637
~dump_manager()
Definition dumpfile.cc:191
dump_flags_t m_optinfo_flags
Definition dumpfile.h:758
int dump_start(int phase, dump_flags_t *flag_ptr)
Definition dumpfile.cc:1462
void dump_switch_p(const char *arg)
Definition dumpfile.cc:1892
char * get_dump_file_name(int phase, int part=-1) const
Definition dumpfile.cc:310
Definition tree-pass.h:74
Definition poly-int.h:374
const union tree_node * const_tree
Definition coretypes.h:98
union tree_node * tree
Definition coretypes.h:97
static unsigned int count[debug_counter_number_of_counters]
Definition dbgcnt.cc:50
void void dump_printf_loc(const dump_metadata_t &, const dump_user_location_t &, const char *,...) ATTRIBUTE_GCC_DUMP_PRINTF(3
void dump_hex(dump_flags_t, const poly_wide_int &)
Definition dumpfile.cc:1393
optgroup_flag
Definition dumpfile.h:252
@ OPTGROUP_VEC
Definition dumpfile.h:268
@ OPTGROUP_INLINE
Definition dumpfile.h:262
@ OPTGROUP_IPA
Definition dumpfile.h:256
@ OPTGROUP_NONE
Definition dumpfile.h:253
@ OPTGROUP_OTHER
Definition dumpfile.h:271
@ OPTGROUP_OMP
Definition dumpfile.h:265
@ OPTGROUP_LOOP
Definition dumpfile.h:259
@ OPTGROUP_ALL
Definition dumpfile.h:273
void dump_symtab_node(const dump_metadata_t &, symtab_node *)
Definition dumpfile.cc:1417
void set_dump_file(FILE *new_dump_file)
Definition dumpfile.cc:72
dump_flags_t dump_flags
Definition dumpfile.cc:64
dump_kind
Definition dumpfile.h:64
@ DK_tree
Definition dumpfile.h:67
@ DK_ipa
Definition dumpfile.h:69
@ DK_rtl
Definition dumpfile.h:68
@ DK_none
Definition dumpfile.h:65
@ DK_lang
Definition dumpfile.h:66
FILE * dump_begin(int, dump_flags_t *, int part=-1)
Definition dumpfile.cc:1539
void dump_generic_expr_loc(const dump_metadata_t &, const dump_user_location_t &, dump_flags_t, tree)
Definition dumpfile.cc:1325
dump_flag
Definition dumpfile.h:78
@ TDF_ALIAS
Definition dumpfile.h:132
@ MSG_ALL_PRIORITIES
Definition dumpfile.h:190
@ TDF_EH
Definition dumpfile.h:126
@ TDF_FOLDING
Definition dumpfile.h:147
@ TDF_ENUMERATE_LOCALS
Definition dumpfile.h:135
@ TDF_GIMPLE
Definition dumpfile.h:144
@ TDF_STMTADDR
Definition dumpfile.h:110
@ MSG_PRIORITY_INTERNALS
Definition dumpfile.h:181
@ TDF_MEMSYMS
Definition dumpfile.h:117
@ TDF_RHS_ONLY
Definition dumpfile.h:120
@ TDF_ASMNAME
Definition dumpfile.h:123
@ TDF_SLIM
Definition dumpfile.h:86
@ MSG_PRIORITY_REEMITTED
Definition dumpfile.h:187
@ TDF_ERROR
Definition dumpfile.h:204
@ TDF_UID
Definition dumpfile.h:107
@ TDF_GRAPH
Definition dumpfile.h:113
@ TDF_DETAILS
Definition dumpfile.h:92
@ TDF_GIMPLE_VAL
Definition dumpfile.h:201
@ TDF_STATS
Definition dumpfile.h:95
@ TDF_COMPARE_DEBUG
Definition dumpfile.h:198
@ MSG_PRIORITY_USER_FACING
Definition dumpfile.h:178
@ TDF_NONE
Definition dumpfile.h:80
@ TDF_VOPS
Definition dumpfile.h:101
@ MSG_NOTE
Definition dumpfile.h:159
@ TDF_BLOCKS
Definition dumpfile.h:98
@ TDF_ALL_VALUES
Definition dumpfile.h:195
@ TDF_RAW
Definition dumpfile.h:89
@ TDF_NOUID
Definition dumpfile.h:129
@ TDF_SCEV
Definition dumpfile.h:141
@ TDF_ADDRESS
Definition dumpfile.h:83
@ MSG_ALL_KINDS
Definition dumpfile.h:162
@ MSG_MISSED_OPTIMIZATION
Definition dumpfile.h:156
@ TDF_LINENO
Definition dumpfile.h:104
@ MSG_OPTIMIZED_LOCATIONS
Definition dumpfile.h:153
@ TDF_CSELIB
Definition dumpfile.h:138
void dump_end(int, FILE *)
Definition dumpfile.cc:1671
void dump_gimple_expr_loc(const dump_metadata_t &, const dump_user_location_t &, dump_flags_t, gimple *, int)
Definition dumpfile.cc:1301
void dumpfile_ensure_any_optinfo_are_flushed()
Definition dumpfile.cc:1409
const char * dump_file_name
Definition dumpfile.cc:63
dump_flags_t & operator&=(dump_flags_t &lhs, dump_flags_t rhs)
Definition dumpfile.h:240
void dump_gimple_expr(const dump_metadata_t &, dump_flags_t, gimple *, int)
Definition dumpfile.cc:1290
dump_flags_t & operator|=(dump_flags_t &lhs, dump_flags_t rhs)
Definition dumpfile.h:232
void dump_gimple_stmt_loc(const dump_metadata_t &, const dump_user_location_t &, dump_flags_t, gimple *, int)
Definition dumpfile.cc:1276
void dump_begin_scope(const char *name, const dump_user_location_t &user_location, const dump_impl_location_t &impl_location)
Definition dumpfile.cc:1439
tree_dump_index
Definition dumpfile.h:42
@ TDI_cgraph
Definition dumpfile.h:44
@ TDI_end
Definition dumpfile.h:58
@ TDI_original
Definition dumpfile.h:47
@ TDI_clones
Definition dumpfile.h:46
@ TDI_gimple
Definition dumpfile.h:48
@ TDI_profile_report
Definition dumpfile.h:51
@ TDI_ipa_all
Definition dumpfile.h:56
@ TDI_lto_stream_out
Definition dumpfile.h:50
@ TDI_none
Definition dumpfile.h:43
@ TDI_nested
Definition dumpfile.h:49
@ TDI_tree_all
Definition dumpfile.h:54
@ TDI_inheritance
Definition dumpfile.h:45
@ TDI_lang_all
Definition dumpfile.h:53
@ TDI_rtl_all
Definition dumpfile.h:55
dump_flags_t operator&(dump_flags_t lhs, dump_flags_t rhs)
Definition dumpfile.h:219
void dump_node(const_tree, dump_flags_t, FILE *)
Definition tree-dump.cc:721
void dump_gimple_stmt(const dump_metadata_t &, dump_flags_t, gimple *, int)
Definition dumpfile.cc:1266
bool enable_rtl_dump_file(void)
Definition dumpfile.cc:2075
unsigned int get_dump_scope_depth()
Definition dumpfile.cc:1427
void dump_printf(const dump_metadata_t &, const char *,...) ATTRIBUTE_GCC_DUMP_PRINTF(2
int opt_info_switch_p(const char *)
Definition dumpfile.cc:2012
const kv_pair< optgroup_flags_t > optgroup_options[]
Definition dumpfile.cc:169
bool dumps_are_enabled
Definition dumpfile.cc:65
#define ATTRIBUTE_GCC_DUMP_PRINTF(m, n)
Definition dumpfile.h:36
dump_flags_t parse_dump_option(const char *, const char **)
Definition dumpfile.cc:1788
FILE * dump_file
Definition dumpfile.cc:62
dump_flags_t operator~(dump_flags_t flags)
Definition dumpfile.h:226
void void void dump_function(int phase, tree fn)
Definition dumpfile.cc:2059
void dump_generic_expr(const dump_metadata_t &, dump_flags_t, tree)
Definition dumpfile.cc:1314
const char * dump_flag_name(int)
Definition dumpfile.cc:1610
void dump_basic_block(dump_flags_t, basic_block, int)
Definition dumpfile.cc:2046
dump_flags_t operator|(dump_flags_t lhs, dump_flags_t rhs)
Definition dumpfile.h:212
void dump_bb(FILE *, basic_block, int, dump_flags_t)
Definition cfghooks.cc:299
enum dump_flag dump_flags_t
Definition dumpfile.h:209
bool dump_enabled_p(void)
Definition dumpfile.h:532
enum optgroup_flag optgroup_flags_t
Definition dumpfile.h:277
void dump_dec(const dump_metadata_t &, const poly_int< N, C > &)
Definition dumpfile.cc:1365
void dump_end_scope()
Definition dumpfile.cc:1449
#define N
Definition gensupport.cc:202
#define UNKNOWN_LOCATION
Definition input.h:32
Definition context.h:23
signop
Definition signop.h:28
Definition basic-block.h:117
Definition dumpfile.h:296
int num
Definition dumpfile.h:324
const char * glob
Definition dumpfile.h:302
const char * alt_filename
Definition dumpfile.h:306
dump_kind dkind
Definition dumpfile.h:312
int pstate
Definition dumpfile.h:320
FILE * pstream
Definition dumpfile.h:308
bool owns_strings
Definition dumpfile.h:327
const char * pfilename
Definition dumpfile.h:304
dump_flags_t pflags
Definition dumpfile.h:314
dump_flags_t alt_flags
Definition dumpfile.h:316
const char * swtch
Definition dumpfile.h:300
optgroup_flags_t optgroup_flags
Definition dumpfile.h:318
FILE * alt_stream
Definition dumpfile.h:310
const char * suffix
Definition dumpfile.h:298
int alt_state
Definition dumpfile.h:322
bool graph_dump_initialized
Definition dumpfile.h:330
Definition function.h:249
Definition gimple.h:225
Definition coretypes.h:381
Definition profile-count.h:750
Definition rtl.h:545
Definition cgraph.h:106
#define NULL
Definition system.h:50