AArch64: Fix macro cleanups for SME builtins
Cleans up macro undefinitions for AArch64 SME builtins to prevent conflicts.
This commit addresses an issue with macro management for AArch64 Scalable Matrix Extension (SME) builtins. It ensures that all macros defined within a .def file are properly undefined at the end of the file’s inclusion. This prevents macro leakage and potential conflicts when subsequent .def files are processed. Specifically, the DEF_SME_FUNCTION_GS macro was missing its corresponding undef directive.
In Details
The .def file mechanism in GCC's configuration, particularly for AArch64 SME builtins (aarch64-sve-builtins-sme.def), requires careful management of macros. Macros defined in these files can persist and conflict with macros from other .def files processed later in the build. This patch correctly adds an undef directive for DEF_SME_FUNCTION_GS at the end of its definition block, ensuring a clean slate for subsequent macro definitions and preventing symbol or macro namespace pollution.
- SME
- Scalable Matrix Extension. An optional extension for ARMv8-A architecture processors that provides new instructions for matrix operations, significantly boosting performance for scientific computing and machine learning workloads.
- builtins
- Special functions recognized by a compiler that perform specific operations, often corresponding to assembly instructions or intrinsic functions. They provide a way to access low-level hardware features from high-level code.
- macro
- A piece of code that represents a sequence of programming instructions as a particular pattern. In C/C++, macros are typically handled by the preprocessor, allowing for text substitution before compilation.
- .def file
- In GCC's build system,
.deffiles are often used to define macros or configurations related to specific targets or features. They are included during the build process to set up compiler behavior.