Jason Merrill 2674fa47de Implement P0479R5, [[likely]] and [[unlikely]].
[[likely]] and [[unlikely]] are equivalent to the GNU hot/cold attributes,
except that they can be applied to arbitrary statements as well as labels;
this is most likely to be useful for marking if/else branches as likely or
unlikely.  Conveniently, PREDICT_EXPR fits the bill nicely as a
representation.

I also had to fix marking case labels as hot/cold, which didn't work before.
Which then required me to force __attribute ((fallthrough)) to apply to the
statement rather than the label.

gcc/
	* gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
gcc/c-family/
	* c-lex.c (c_common_has_attribute): Handle likely/unlikely.
	* c-attribs.c (attr_cold_hot_exclusions): Make public.
gcc/cp/
	* tree.c (handle_likeliness_attribute): New.
	(std_attribute_table): Add likely/unlikely.
	* cp-gimplify.c (lookup_hotness_attribute, remove_hotness_attribute)
	(process_stmt_hotness_attribute, first_stmt): New.
	(genericize_if_stmt): Check for duplicate predictions.
	* parser.c (cp_parser_statement): Call
	process_stmt_hotness_attribute.
	(cp_parser_label_for_labeled_statement): Apply attributes to case.
	* decl.c (finish_case_label): Give label in template type void.
	* pt.c (tsubst_expr) [CASE_LABEL_EXPR]: Copy attributes.
	[PREDICT_EXPR]: Handle.

From-SVN: r266223
2018-11-16 16:49:42 -05:00
2018-11-13 15:28:26 +00:00
2018-07-06 06:22:08 +00:00

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.
Description
No description provided
Readme 2.1 GiB
Languages
C++ 31.9%
C 31.3%
Ada 12%
D 6.5%
Go 6.4%
Other 11.5%