Pass an rtx_insn* to redundant_insn.
Pass an rtx_insn* to redundant_insn for precise instruction handling.
This commit updates the redundant_insn function in reorg.cc to accept an rtx_insn * argument. Additionally, relax_delay_slots is modified to maintain the next real instruction in an rtx_insn *. This change enhances the precision with which redundant instructions are identified and handled, ensuring that context is maintained correctly during instruction reordering and optimization passes.
In Details
The redundant_insn function in reorg.cc is modified to take an rtx_insn *. This allows it to operate on a specific instruction rather than a more general RTL structure. Concurrently, relax_delay_slots is adjusted to hold the subsequent real instruction in an rtx_insn *. This change likely improves the accuracy of delay slot relaxation and redundant instruction elimination by providing precise instruction context to these reorg passes.
- 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. - redundant_insn
- A GCC internal function or pass likely responsible for identifying and potentially removing redundant or equivalent machine instructions from the RTL code, aiming to optimize performance or reduce code size.
- relax_delay_slots
- A GCC internal function or pass that handles instruction scheduling for architectures with delay slots. It aims to fill these slots with useful instructions to avoid pipeline stalls.
- reorg.cc
- A source file in GCC likely containing functions related to the reordering and reorganization of RTL instructions.