Use functions for three insn predicates
Replaces macros with functions for better type safety when checking instruction properties.
This commit replaces several macros used for checking instruction properties (like NOTE_INSN_BASIC_BLOCK_P) with proper functions. These functions now take an rtx_insn* directly, improving type safety and code clarity. This change refactors the internal representation of notes and flags associated with instructions, contributing to a more robust compiler.
In Details
This change converts several RTX predicate macros in rtl.h (e.g., NOTE_INSN_BASIC_BLOCK_P, DEBUG_BIND_INSN_P, NOTE_DURING_CALL_P) into inline functions that accept an rtx_insn*. This is a common pattern for improving type safety and encapsulation of the RTX representation, moving away from direct macro expansion that could be prone to errors. The update facilitates cleaner access to instruction properties, particularly for debug and CFI (Call Frame Information) related notes.
- RTX
- Representation of intermediate values in GCC. It's a tree-like data structure used to represent expressions, instructions, and other program elements during compilation.
- rtx_insn*
- A pointer to an RTX specifically representing a machine instruction.
- CFI
- Call Frame Information. DWARF information used by debuggers to unwind the call stack, detailing how to restore the caller's registers and return address.