Pass an rtx_insn* to add_reg_note.
Pass an rtx_insn* to add_reg_note for improved RTL handling.
This commit modifies the add_reg_note function to accept an rtx_insn* argument. This change is applied across various RTL analysis and code generation functions, ensuring that instruction information is correctly passed and utilized. Specific instances in rl78 and s390 backends now correctly pass the instruction pointer, improving the accuracy of note-related operations.
In Details
This commit modifies the add_reg_note function in rtlanal.cc and rtl.h to accept an rtx_insn *. Previously, it might have operated on broader RTL structures. Passing a specific instruction pointer (rtx_insn *) provides finer-grained context for adding register notes. This is crucial for accurate instruction analysis and optimization, especially in backends like s390 and rl78 where instruction sequencing and metadata are critical for correctness.
- rtx_insn
- An RTX (Real-Time Expression) object representing a GCC internal representation of a machine instruction.
rtx_insn *is a pointer to such an instruction. - RTL
- Register Transfer Language, an intermediate representation used by GCC to represent code between parsing and machine-specific code generation. It's a Lisp-like language of expressions.
- add_reg_note
- A GCC internal function used to add a note associated with a register, likely for tracking register usage, dependencies, or other metadata critical for optimization and code generation.