summaryrefslogtreecommitdiff
path: root/gcc/dumpfile.h
diff options
context:
space:
mode:
authorsinghai <singhai@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-01 07:34:44 +0000
committersinghai <singhai@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-01 07:34:44 +0000
commitc78757312e5dfd44ed98f349711940e09d0bc84d (patch)
tree47725ebeed1bb76102194e7ca04ca401b8d512ff /gcc/dumpfile.h
parentaf427fc5dbbe95978f0c54cbb4af3e5e10824979 (diff)
downloadgcc-c78757312e5dfd44ed98f349711940e09d0bc84d.tar.gz
2012-11-01 Sharad Singhai <singhai@google.com>
* doc/invoke.texi: Update -fopt-info documentation. * dumpfile.c: Move dump_flags here from passes.c. Rename opt_info_options to optinfo_verbosity_options. Add optgroup_options. (dump_files): Add field for optinfo_flags in the static initializer. (dump_register): Handle additional parameter for optgroup_flags. (opt_info_enable_passes): Renamed opt_info_enable_all. Handle optgroup_flags. Fix documentation. (opt_info_switch_p_1): Handle optgroup options. (opt_info_switch_p): Handle optgroup_flags. Warn on multiple files. * dumpfile.h (dump_register): Additional argument for optgroup_flags. All callers updated. (struct dump_file_info): Add field for optgroup_flags. Define OPTGROUP_* flags. * tree-pass.h (struct opt_pass): Add addtional field for optinfo_flags. All opt_pass static initializers updated. * opts-global.c (dump_remap_tree_vectorizer_verbose): Use 'all' instead of 'optall'. (handle_common_deferred_options): Fix typo in error message. * passes.c (register_one_dump_file): Add argument for optgroup_flags. Turn on OPTGROUP_IPA for IPA passes. Move dump_flags from here to dumpfile.c. * statistics.c (statistics_early_init): Use OPTGROUP_NONE in call to dump_register. testsuite/ChangeLog * testsuite/gcc.dg/plugin/selfassign.c: Add opgtroup_flags initializer. * testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise. * testsuite/g++.dg/plugin/selfassign.c: Likewise. * testsuite/g++.dg/plugin/dumb_plugin.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dumpfile.h')
-rw-r--r--gcc/dumpfile.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/gcc/dumpfile.h b/gcc/dumpfile.h
index b2efc804c09..bcef9c6e337 100644
--- a/gcc/dumpfile.h
+++ b/gcc/dumpfile.h
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "line-map.h"
/* Different tree dump places. When you add new tree dump places,
- extend the DUMP_FILES array in tree-dump.c. */
+ extend the DUMP_FILES array in dumpfile.c. */
enum tree_dump_index
{
TDI_none, /* No dump */
@@ -46,9 +46,9 @@ enum tree_dump_index
/* Bit masks to control dumping. Not all values are applicable to all
dumps. Add new ones at the end. When you define new values, extend
- the DUMP_OPTIONS array in tree-dump.c. The TDF_* flags coexist with
- MSG_* flags (for -fopt-info) and the bit values must be chosen
- to allow that. */
+ the DUMP_OPTIONS array in dumpfile.c. The TDF_* flags coexist with
+ MSG_* flags (for -fopt-info) and the bit values must be chosen to
+ allow that. */
#define TDF_ADDRESS (1 << 0) /* dump node addresses */
#define TDF_SLIM (1 << 1) /* don't go wild following links */
#define TDF_RAW (1 << 2) /* don't unparse the function */
@@ -91,6 +91,18 @@ enum tree_dump_index
#define MSG_ALL (MSG_OPTIMIZED_LOCATIONS | MSG_MISSED_OPTIMIZATION \
| MSG_NOTE)
+
+/* Flags to control high-level -fopt-info dumps. Usually these flags
+ define a group of passes. An optimization pass can be part of
+ multiple groups. */
+#define OPTGROUP_NONE (0)
+#define OPTGROUP_IPA (1 << 1) /* IPA optimization passes */
+#define OPTGROUP_LOOP (1 << 2) /* Loop optimization passes */
+#define OPTGROUP_INLINE (1 << 3) /* Inlining passes */
+#define OPTGROUP_VEC (1 << 4) /* Vectorization passes */
+#define OPTGROUP_ALL (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \
+ | OPTGROUP_VEC)
+
/* Define a tree dump switch. */
struct dump_file_info
{
@@ -98,13 +110,14 @@ struct dump_file_info
const char *swtch; /* command line dump switch */
const char *glob; /* command line glob */
const char *pfilename; /* filename for the pass-specific stream */
- const char *alt_filename; /* filename for the opt-info stream */
+ const char *alt_filename; /* filename for the -fopt-info stream */
FILE *pstream; /* pass-specific dump stream */
- FILE *alt_stream; /* opt-info stream */
+ FILE *alt_stream; /* -fopt-info stream */
+ int optgroup_flags; /* optgroup flags for -fopt-info */
int pflags; /* dump flags */
int alt_flags; /* flags for opt-info */
int pstate; /* state of pass-specific stream */
- int alt_state; /* state of the opt-info stream */
+ int alt_state; /* state of the -fopt-info stream */
int num; /* dump file number */
};
@@ -129,7 +142,7 @@ 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 unsigned int dump_register (const char *, const char *, const char *,
- int);
+ int, int);
extern bool enable_rtl_dump_file (void);
/* In combine.c */
@@ -146,8 +159,7 @@ extern const char *dump_file_name;
/* Return the dump_file_info for the given phase. */
extern struct dump_file_info *get_dump_file_info (int);
-/* Return true if any of the dumps are enabled, false otherwise. */
-
+/* Return true if any of the dumps is enabled, false otherwise. */
static inline bool
dump_enabled_p (void)
{