GCC modified for the FreeChainXenon project
Find a file
David Malcolm 7db960c5b6 Add -fopt-info-internals
This patch introduces a verbosity level to dump messages:
"user-facing" vs "internals".

By default, messages at the top-level dump scope are "user-facing",
whereas those that are in nested scopes are implicitly "internals",
and are filtered out by -fopt-info unless a new "-internals" sub-option
of "-fopt-info" is supplied (intended purely for use by GCC developers).
Dumpfiles are unaffected by the change.

Given that the vectorizer is the only subsystem using AUTO_DUMP_SCOPE
(via DUMP_VECT_SCOPE), this only affects the vectorizer.

Filtering out these implementation-detail messages goes a long way
towards making -fopt-info-vec-all more accessible to advanced end-users;
the follow-up patch restores the most pertinent missing details.

gcc/ChangeLog:
	* doc/invoke.texi (-fopt-info): Document new "internals"
	sub-option.
	* dump-context.h (dump_context::apply_dump_filter_p): New decl.
	* dumpfile.c (dump_options): Update for renaming of MSG_ALL to
	MSG_ALL_KINDS.
	(optinfo_verbosity_options): Add "internals".
	(kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
	(dump_context::apply_dump_filter_p): New member function.
	(dump_context::dump_loc): Use apply_dump_filter_p rather than
	explicitly masking the dump_kind.
	(dump_context::begin_scope): Increment the scope depth first.  Use
	apply_dump_filter_p rather than explicitly masking the dump_kind.
	(dump_context::emit_item): Use apply_dump_filter_p rather than
	explicitly masking the dump_kind.
	(dump_dec): Likewise.
	(dump_hex): Likewise.
	(dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
	(opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
	(opt_info_switch_p): Update handling of default
	MSG_OPTIMIZED_LOCATIONS to cope with default of
	MSG_PRIORITY_USER_FACING.
	(dump_basic_block): Use apply_dump_filter_p rather than explicitly
	masking the dump_kind.
	(selftest::test_capture_of_dump_calls): Update test_dump_context
	instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
	than MSG_ALL.  Generalize scope test to be run at all four
	combinations of with/without MSG_PRIORITY_USER_FACING and
	MSG_PRIORITY_INTERNALS, adding examples of explicit priority
	for each of the two values.
	* dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
	Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
	MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
	values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
	(AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
	with MSG_PRIORITY_*.
	* tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
	dump messages as MSG_PRIORITY_USER_FACING.
	* tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
	about the interaction with MSG_PRIORITY_*.

gcc/testsuite/ChangeLog:
	* gcc.dg/plugin/dump-1.c: Update expected output for test_scopes
	due to "-internals" not being selected.
	* gcc.dg/plugin/dump-2.c: New test, based on dump-1.c, with
	"-internals" added to re-enable the output from test_scopes.
	* gcc.dg/plugin/plugin.exp (plugin_test_list): Add dump-2.c.

From-SVN: r264851
2018-10-04 17:41:08 +00:00
config Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
contrib contrib: Add unused_functions.py script 2018-10-04 10:59:12 +02:00
fixincludes fixincludes: vxworks: remove unnecessary parentheses in ioctl wrapper macro 2018-09-03 13:26:45 +00:00
gcc Add -fopt-info-internals 2018-10-04 17:41:08 +00:00
gnattools
gotools Ignore chmod errors during mostlyclean-local, check-go-tool 2018-09-26 12:56:09 +00:00
include Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
INSTALL
intl libgnuintl.h (_INTL_MAY_RETURN_STRING_ARG, [...]): Backport changes from upstream gettext. 2018-09-18 22:08:49 -06:00
libada Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libatomic Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libbacktrace Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libcc1
libcpp Add range_idx param to range_label::get_text 2018-09-17 23:32:12 +00:00
libdecnumber Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libffi Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libgcc Fix divergence in indirect profiling (PR gcov-profile/84107). 2018-10-04 12:41:14 +00:00
libgfortran * io/close.c [!HAVE_UNLINK_OPEN_FILE]: Include <string.h>. 2018-10-02 20:02:03 +00:00
libgo internal/bytealg: support systems that don't have memmem 2018-10-02 16:45:51 +00:00
libgomp [nvptx] Remove use of CUDA unified memory in libgomp 2018-09-18 08:41:54 -07:00
libhsail-rt
libiberty [libiberty] Use pipe inside pex_run 2018-10-01 18:46:51 +00:00
libitm Remove nfs bogon 2018-08-03 14:53:48 -06:00
libobjc Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
liboffloadmic
libquadmath
libsanitizer Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libssp Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libstdc++-v3 PR libstdc++/59439 optimize uses of classic ("C") std::locale 2018-10-03 12:27:40 +01:00
libvtv Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
lto-plugin Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog List myself as "libgomp (OpenACC)" and "OpenACC" maintainer 2018-10-04 17:50:34 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess Update config.guess and config.sub 2018-07-06 05:57:35 +00:00
config.rpath
config.sub Update config.sub 2018-07-06 06:22:08 +00:00
configure
configure.ac
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS List myself as "libgomp (OpenACC)" and "OpenACC" maintainer 2018-10-04 17:50:34 +02:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.