Fix PCH restoration of ARM SIMD and FP16 builtin types.
GCC ARM backend now correctly restores SIMD and FP16 types when loading PCH files.
The ARM backend’s SIMD and FP16 builtin types were not being properly registered as GGC roots, leading to incorrect restoration when loading Precompiled Header (PCH) files. This caused inconsistencies and an Internal Compiler Error (ICE) in arm_mve_type_for_scalar_type. The fix adds necessary GTY annotations and registers relevant headers with gengtype to ensure these types are properly handled during PCH loading.
In Details
This commit addresses an issue in the ARM backend (config/arm/arm-builtins.cc and .h) where SIMD and FP16 type nodes were not correctly handled across PCH boundaries. Specifically, arm_simd_types and arm_fp16_type_node were not declared with GTY annotations to be tracked by GCC's garbage collector (GGC) for object persistence. This patch adds these annotations and includes arm-builtins.h in config.gcc's target_gtfiles so that gengtype processes the definitions, ensuring proper restoration of these type pointers when a PCH is loaded, thus fixing an ICE in `arm_mve_type_for_sc…
- PCH
- Precompiled Header, a compilation technique where header files are precompiled into a binary format to speed up subsequent compilations.
- ARM SIMD
- ARM's Single Instruction, Multiple Data (SIMD) extensions, used for parallel processing of data elements. Examples include NEON.
- FP16
- Half-precision floating-point format (16-bit), offering reduced memory usage and potentially faster computation compared to single-precision (32-bit).
- GTY
- GCC's garbage collection type information annotations, used to mark data structures that the compiler's memory manager should track and preserve.
- GGC
- GCC's Garbage Collector, a system for automatically managing memory used by the compiler's internal data structures.
- ICE
- Internal Compiler Error, a fatal error indicating a bug within the compiler itself.