123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- #ifndef GCC_DUMPFILE_H
- #define GCC_DUMPFILE_H 1
- #include "line-map.h"
- enum tree_dump_index
- {
- TDI_none,
- TDI_cgraph,
- TDI_inheritance,
- TDI_tu,
- TDI_class,
- TDI_original,
- TDI_generic,
- TDI_nested,
- TDI_tree_all,
- TDI_rtl_all,
- TDI_ipa_all,
- TDI_end
- };
- #define TDF_ADDRESS (1 << 0)
- #define TDF_SLIM (1 << 1)
- #define TDF_RAW (1 << 2)
- #define TDF_DETAILS (1 << 3)
- #define TDF_STATS (1 << 4)
- #define TDF_BLOCKS (1 << 5)
- #define TDF_VOPS (1 << 6)
- #define TDF_LINENO (1 << 7)
- #define TDF_UID (1 << 8)
- #define TDF_TREE (1 << 9)
- #define TDF_RTL (1 << 10)
- #define TDF_IPA (1 << 11)
- #define TDF_STMTADDR (1 << 12)
- #define TDF_GRAPH (1 << 13)
- #define TDF_MEMSYMS (1 << 14)
- #define TDF_DIAGNOSTIC (1 << 15)
- #define TDF_VERBOSE (1 << 16)
- #define TDF_RHS_ONLY (1 << 17)
- #define TDF_ASMNAME (1 << 18)
- #define TDF_EH (1 << 19)
- #define TDF_NOUID (1 << 20)
- #define TDF_ALIAS (1 << 21)
- #define TDF_ENUMERATE_LOCALS (1 << 22)
- #define TDF_CSELIB (1 << 23)
- #define TDF_SCEV (1 << 24)
- #define TDF_COMMENT (1 << 25)
- #define MSG_OPTIMIZED_LOCATIONS (1 << 26)
- #define MSG_MISSED_OPTIMIZATION (1 << 27)
- #define MSG_NOTE (1 << 28)
- #define MSG_ALL (MSG_OPTIMIZED_LOCATIONS | MSG_MISSED_OPTIMIZATION \
- | MSG_NOTE)
- #define OPTGROUP_NONE (0)
- #define OPTGROUP_IPA (1 << 1)
- #define OPTGROUP_LOOP (1 << 2)
- #define OPTGROUP_INLINE (1 << 3)
- #define OPTGROUP_VEC (1 << 4)
- #define OPTGROUP_OTHER (1 << 5)
- #define OPTGROUP_ALL (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \
- | OPTGROUP_VEC | OPTGROUP_OTHER)
- struct dump_file_info
- {
- const char *suffix;
- const char *swtch;
- const char *glob;
- const char *pfilename;
- const char *alt_filename;
- FILE *pstream;
- FILE *alt_stream;
- int pflags;
- int optgroup_flags;
- int alt_flags;
- int pstate;
- int alt_state;
- int num;
- bool owns_strings;
- };
- extern FILE *dump_begin (int, int *);
- extern void dump_end (int, FILE *);
- extern int opt_info_switch_p (const char *);
- extern const char *dump_flag_name (int);
- extern void dump_printf (int, const char *, ...) ATTRIBUTE_PRINTF_2;
- extern void dump_printf_loc (int, source_location,
- const char *, ...) ATTRIBUTE_PRINTF_3;
- extern void dump_basic_block (int, basic_block, int);
- extern void dump_generic_expr_loc (int, source_location, int, tree);
- extern void dump_generic_expr (int, int, tree);
- extern void dump_gimple_stmt_loc (int, source_location, int, gimple, int);
- extern void dump_gimple_stmt (int, int, gimple, int);
- extern void print_combine_total_stats (void);
- extern bool enable_rtl_dump_file (void);
- extern void dump_node (const_tree, int, FILE *);
- extern void dump_combine_total_stats (FILE *);
- extern void dump_bb (FILE *, basic_block, int, int);
- extern FILE *dump_file;
- extern FILE *alt_dump_file;
- extern int dump_flags;
- extern const char *dump_file_name;
- static inline bool
- dump_enabled_p (void)
- {
- return (dump_file || alt_dump_file);
- }
- namespace gcc {
- class dump_manager
- {
- public:
- dump_manager ();
- ~dump_manager ();
-
- unsigned int
- dump_register (const char *suffix, const char *swtch, const char *glob,
- int flags, int optgroup_flags,
- bool take_ownership);
-
- struct dump_file_info *
- get_dump_file_info (int phase) const;
- struct dump_file_info *
- get_dump_file_info_by_switch (const char *swtch) const;
-
- char *
- get_dump_file_name (int phase) const;
- char *
- get_dump_file_name (struct dump_file_info *dfi) const;
- int
- dump_switch_p (const char *arg);
-
- int
- dump_start (int phase, int *flag_ptr);
-
- void
- dump_finish (int phase);
- FILE *
- dump_begin (int phase, int *flag_ptr);
-
- int
- dump_initialized_p (int phase) const;
-
- const char *
- dump_flag_name (int phase) const;
- private:
- int
- dump_phase_enabled_p (int phase) const;
- int
- dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob);
- int
- dump_enable_all (int flags, const char *filename);
- int
- opt_info_enable_passes (int optgroup_flags, int flags, const char *filename);
- private:
-
- int m_next_dump;
- struct dump_file_info *m_extra_dump_files;
- size_t m_extra_dump_files_in_use;
- size_t m_extra_dump_files_alloced;
-
- friend bool ::enable_rtl_dump_file (void);
-
- friend int ::opt_info_switch_p (const char *arg);
- };
- }
- #endif
|