Add the callback_only attribute.
Introduces the 'callback_only' attribute for user programs.
This patch introduces a new attribute, ‘callback_only’, making the functionality previously available only internally accessible to users. It renames and moves the attribute handler to c-attribs.cc for better organization and ensures consistency by updating relevant definitions and documentation.
In Details
This commit introduces the callback_only attribute, a user-facing alias for an internal callback-related attribute. It moves the attribute's handling logic from attr-callback.cc to c-family/c-attribs.cc, renames identifiers (e.g., handle_callback_attribute to handle_callback_only_attribute), and updates definitions in builtin-attrs.def and documentation. The attribute is integrated into various compiler components, including cgraph and IPA passes, and also for OpenMP built-ins.
- callback_only attribute
- A new GCC attribute that can be applied to functions to signify specific callback-related properties, likely for optimization or analysis purposes.
- builtin-attrs.def
- A file in GCC that defines built-in attributes, their properties, and how they are handled by the compiler.
- IPA
- Interprocedural Analysis. A compiler analysis phase that examines relationships between different functions in a program, rather than just a single function in isolation.
- OpenMP
- A standardized API for shared-memory parallel programming, allowing developers to easily parallelize loops and code regions.