diff options
author | Andreas Krebbel <krebbel@linux.ibm.com> | 2023-11-14 11:33:45 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.ibm.com> | 2023-11-14 11:40:08 +0100 |
commit | 426e92643285a081d2e32221268b2052d740aa35 (patch) | |
tree | 6845d6bf814b3e634ff61db670e0a037e8d53604 /gcc/config/s390 | |
parent | a745d2064f3e8a368995c67e80146e563d6a8fec (diff) | |
download | gcc-426e92643285a081d2e32221268b2052d740aa35.zip gcc-426e92643285a081d2e32221268b2052d740aa35.tar.gz gcc-426e92643285a081d2e32221268b2052d740aa35.tar.bz2 |
IBM Z: Add GTY marker to builtin data structures
This adds GTY markers to s390_builtin_types, s390_builtin_fn_types,
and s390_builtin_decls. These were missing causing problems in
particular when using builtins after including a precompiled header.
Unfortunately the declaration of these data structures use enum values
from s390-builtins.h. This file however is not included everywhere
and is rather large. In order to include it only for the purpose of
gtype-desc.cc we place a preprocessed copy of it in the build
directory and include only this.
This is going to be backported to GCC 12 and 13.
gcc/ChangeLog:
* config.gcc: Add s390-gen-builtins.h to target_gtfiles.
* config/s390/s390-builtins.h (s390_builtin_types)
(s390_builtin_fn_types, s390_builtin_decls): Add GTY marker.
* config/s390/t-s390 (EXTRA_GTYPE_DEPS): Add s390-gen-builtins.h.
Add build rule for s390-gen-builtins.h.
Diffstat (limited to 'gcc/config/s390')
-rw-r--r-- | gcc/config/s390/s390-builtins.h | 10 | ||||
-rw-r--r-- | gcc/config/s390/t-s390 | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/config/s390/s390-builtins.h b/gcc/config/s390/s390-builtins.h index 45bba87..84676fe 100644 --- a/gcc/config/s390/s390-builtins.h +++ b/gcc/config/s390/s390-builtins.h @@ -88,8 +88,8 @@ enum s390_builtin_ov_type_index #define MAX_OV_OPERANDS 6 -extern tree s390_builtin_types[BT_MAX]; -extern tree s390_builtin_fn_types[BT_FN_MAX]; +extern GTY(()) tree s390_builtin_types[BT_MAX]; +extern GTY(()) tree s390_builtin_fn_types[BT_FN_MAX]; /* Builtins. */ @@ -172,6 +172,6 @@ opflags_for_builtin (int fcode) return opflags_builtin[fcode]; } -extern tree s390_builtin_decls[S390_BUILTIN_MAX + - S390_OVERLOADED_BUILTIN_MAX + - S390_OVERLOADED_BUILTIN_VAR_MAX]; +extern GTY(()) tree s390_builtin_decls[S390_BUILTIN_MAX + + S390_OVERLOADED_BUILTIN_MAX + + S390_OVERLOADED_BUILTIN_VAR_MAX]; diff --git a/gcc/config/s390/t-s390 b/gcc/config/s390/t-s390 index 828818b..4ab9718 100644 --- a/gcc/config/s390/t-s390 +++ b/gcc/config/s390/t-s390 @@ -19,6 +19,7 @@ TM_H += $(srcdir)/config/s390/s390-builtins.def TM_H += $(srcdir)/config/s390/s390-builtin-types.def PASSES_EXTRA += $(srcdir)/config/s390/s390-passes.def +EXTRA_GTYPE_DEPS += ./s390-gen-builtins.h s390-c.o: $(srcdir)/config/s390/s390-c.cc \ $(srcdir)/config/s390/s390-protos.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -30,3 +31,6 @@ s390-c.o: $(srcdir)/config/s390/s390-c.cc \ s390-d.o: $(srcdir)/config/s390/s390-d.cc $(COMPILE) $< $(POSTCOMPILE) + +s390-gen-builtins.h: $(srcdir)/config/s390/s390-builtins.h + $(COMPILER) -E $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< > $@ |