GCC modified for the FreeChainXenon project
Find a file
Sandra Loosemore 9f9b3d6732 OpenMP: Use enumerators for names of trait-sets and traits
This patch introduces enumerators to represent trait-set names and
trait names, which makes it easier to use tables to control other
behavior and for switch statements to dispatch on the tags.  The tags
are stored in the same place in the TREE_LIST structure (OMP_TSS_ID or
OMP_TS_ID) and are encoded there as integer constants.

gcc/ChangeLog
	* omp-selectors.h: New file.
	* omp-general.h: Include omp-selectors.h.
	(OMP_TSS_CODE, OMP_TSS_NAME): New.
	(OMP_TS_CODE, OMP_TS_NAME): New.
	(make_trait_set_selector, make_trait_selector): Adjust declarations.
	(omp_construct_traits_to_codes): Likewise.
	(omp_context_selector_set_compare): Likewise.
	(omp_get_context_selector): Likewise.
	(omp_get_context_selector_list): New.
	* omp-general.cc (omp_construct_traits_to_codes): Pass length in
	as argument instead of returning it.  Make it table-driven.
	(omp_tss_map): New.
	(kind_properties, vendor_properties, extension_properties): New.
	(atomic_default_mem_order_properties): New.
	(omp_ts_map): New.
	(omp_check_context_selector): Simplify lookup and dispatch logic.
	(omp_mark_declare_variant): Ignore variants with unknown construct
	selectors.  Adjust for new representation.
	(make_trait_set_selector, make_trait_selector): Adjust for new
	representations.
	(omp_context_selector_matches): Simplify dispatch logic.  Avoid
	fixed-sized buffers and adjust call to omp_construct_traits_to_codes.
	(omp_context_selector_props_compare): Adjust for new representations
	and simplify dispatch logic.
	(omp_context_selector_set_compare): Likewise.
	(omp_context_selector_compare): Likewise.
	(omp_get_context_selector): Adjust for new representations, and split
	out...
	(omp_get_context_selector_list): New function.
	(omp_lookup_tss_code): New.
	(omp_lookup_ts_code): New.
	(omp_context_compute_score): Adjust for new representations.  Avoid
	fixed-sized buffers and magic numbers.  Adjust call to
	omp_construct_traits_to_codes.
	* gimplify.cc (omp_construct_selector_matches): Avoid use of
	fixed-size buffer.  Adjust call to omp_construct_traits_to_codes.

gcc/c/ChangeLog
	* c-parser.cc (omp_construct_selectors): Delete.
	(omp_device_selectors): Delete.
	(omp_implementation_selectors): Delete.
	(omp_user_selectors): Delete.
	(c_parser_omp_context_selector): Adjust for new representations
	and simplify dispatch logic.  Uniformly warn instead of sometimes
	error when an unknown selector is found.  Adjust error messages
	for extraneous/incorrect score.
	(c_parser_omp_context_selector_specification): Likewise.
	(c_finish_omp_declare_variant): Adjust for new representations.

gcc/cp/ChangeLog
	* decl.cc (omp_declare_variant_finalize_one): Adjust for new
	representations.
	* parser.cc (omp_construct_selectors): Delete.
	(omp_device_selectors): Delete.
	(omp_implementation_selectors): Delete.
	(omp_user_selectors): Delete.
	(cp_parser_omp_context_selector): Adjust for new representations
	and simplify dispatch logic.  Uniformly warn instead of sometimes
	error when an unknown selector is found.  Adjust error messages
	for extraneous/incorrect score.
	(cp_parser_omp_context_selector_specification): Likewise.
	* pt.cc (tsubst_attribute): Adjust for new representations.

gcc/fortran/ChangeLog
	* gfortran.h: Include omp-selectors.h.
	(enum gfc_omp_trait_property_kind): Delete, and replace all
	references with equivalent omp_tp_type enumerators.
	(struct gfc_omp_trait_property): Update for omp_tp_type.
	(struct gfc_omp_selector): Replace string name with new enumerator.
	(struct gfc_omp_set_selector): Likewise.
	* openmp.cc (gfc_free_omp_trait_property_list): Update for
	omp_tp_type.
	(omp_construct_selectors): Delete.
	(omp_device_selectors): Delete.
	(omp_implementation_selectors): Delete.
	(omp_user_selectors): Delete.
	(gfc_ignore_trait_property_extension): New.
	(gfc_ignore_trait_property_extension_list): New.
	(gfc_match_omp_selector): Adjust for new representations and simplify
	dispatch logic.  Uniformly warn instead of sometimes error when an
	unknown selector is found.
	(gfc_match_omp_context_selector): Adjust for new representations.
	Adjust error messages for extraneous/incorrect score.
	(gfc_match_omp_context_selector_specification): Likewise.
	* trans-openmp.cc (gfc_trans_omp_declare_variant): Adjust for
	new representations.

gcc/testsuite/
	* c-c++-common/gomp/declare-variant-1.c: Expect warning on
	unknown selectors.
	* c-c++-common/gomp/declare-variant-2.c: Likewise.  Also adjust
	messages for score errors.
	* c-c++-common/gomp/declare-variant-no-score.c: New.
	* gfortran.dg/gomp/declare-variant-1.f90: Expect warning on
	unknown selectors.
	* gfortran.dg/gomp/declare-variant-2.f90: Likewise.  Also adjust
	messages for score errors.
	* gfortran.dg/gomp/declare-variant-no-score.f90: New.
2023-12-19 20:07:13 +00:00
.github Minor formatting fix for newly-added file from previous commit 2023-11-01 19:28:56 -04:00
c++tools Daily bump. 2023-06-23 00:16:38 +00:00
config Daily bump. 2023-12-01 00:17:36 +00:00
contrib Daily bump. 2023-12-15 00:17:17 +00:00
fixincludes Daily bump. 2023-11-23 00:18:14 +00:00
gcc OpenMP: Use enumerators for names of trait-sets and traits 2023-12-19 20:07:13 +00:00
gnattools Daily bump. 2023-04-26 00:17:46 +00:00
gotools Daily bump. 2023-11-04 00:16:45 +00:00
include Daily bump. 2023-12-16 00:17:35 +00:00
INSTALL
libada Daily bump. 2023-08-08 00:17:37 +00:00
libatomic Daily bump. 2023-12-16 00:17:35 +00:00
libbacktrace Daily bump. 2023-12-01 00:17:36 +00:00
libcc1 Daily bump. 2023-12-07 00:17:06 +00:00
libcody Daily bump. 2023-06-16 00:17:18 +00:00
libcpp Daily bump. 2023-12-14 00:18:00 +00:00
libdecnumber Daily bump. 2023-06-16 00:17:18 +00:00
libffi Daily bump. 2023-10-27 00:17:12 +00:00
libgcc Daily bump. 2023-12-17 00:17:30 +00:00
libgfortran Daily bump. 2023-12-19 00:17:36 +00:00
libgm2 Daily bump. 2023-12-14 00:18:00 +00:00
libgo libgo: update configure.ac to upstream GCC 2023-11-30 13:23:53 -08:00
libgomp Daily bump. 2023-12-19 00:17:36 +00:00
libgrust Daily bump. 2023-12-15 00:17:17 +00:00
libiberty Daily bump. 2023-12-06 00:17:50 +00:00
libitm Daily bump. 2023-10-23 00:16:43 +00:00
libobjc Daily bump. 2023-10-23 00:16:43 +00:00
libphobos Daily bump. 2023-12-19 00:17:36 +00:00
libquadmath Daily bump. 2023-12-13 00:17:49 +00:00
libsanitizer Daily bump. 2023-11-29 00:17:27 +00:00
libssp Daily bump. 2023-10-23 00:16:43 +00:00
libstdc++-v3 Daily bump. 2023-12-19 00:17:36 +00:00
libvtv Daily bump. 2023-10-23 00:16:43 +00:00
lto-plugin Daily bump. 2023-10-23 00:16:43 +00:00
maintainer-scripts Daily bump. 2023-11-14 12:23:39 +00:00
zlib Daily bump. 2023-10-23 00:16:43 +00:00
.dir-locals.el
.gitattributes
.gitignore *: add modern gettext 2023-11-14 00:47:11 +01:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2023-12-15 00:17:17 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in LoongArch: Reimplement multilib build option handling. 2023-09-15 10:42:12 +08:00
config.guess
config.rpath
config.sub
configure build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
configure.ac build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Build: fix error in fixinclude configure 2023-11-22 11:54:33 +01:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS libgrust: Add entry for maintainers 2023-12-14 13:34:20 +01:00
Makefile.def build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
Makefile.in build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
Makefile.tpl Makefile.tpl: Avoid race condition in generating site.exp from the top level 2023-11-19 11:07:09 -05:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
SECURITY.txt secpol: consistent indentation 2023-10-05 12:00:39 -04:00
symlink-tree
test-driver
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.