pass rtx_insn * around in the scheduler more
Enhances scheduler's use of instruction pointers for dependency analysis.
This commit significantly increases the use of rtx_insn * pointers within various scheduler components. Functions across multiple scheduling files and target-specific code now accept or store rtx_insn * arguments. This allows the scheduler to more precisely track dependencies and relationships between individual instructions, potentially improving instruction scheduling and reordering for better performance.
In Details
This commit propagates rtx_insn * usage throughout GCC's instruction scheduler, including haifa-sched, modulo-sched, and various dependency tracking utilities in sched-deps.cc, sched-ebb.cc, and sched-rgn.cc. It involves modifying function signatures to accept or store rtx_insn * where previously more generic rtx or other types might have been used. This provides the scheduler with direct access to instruction objects, enabling more precise dependency analysis, such as tracking data or control dependencies between specific instructions, rather than relying on coarser-grained block…
- rtx_insn *
- A pointer to an RTX (Register Transfer Language) instruction. RTX is GCC's internal representation for machine instructions, used after the intermediate language has been translated into a form closer to the target machine code.
- scheduler
- A compiler optimization pass responsible for reordering machine instructions to improve performance, typically by maximizing instruction-level parallelism, minimizing stalls, and utilizing processor resources effectively.
- dependency analysis
- The process of identifying relationships between instructions, such as data dependencies (RAW, WAR, WAW) and control dependencies, which constrain the order in which instructions can be executed.
- haifa-sched
- GCC's Haifa scheduler, an instruction scheduler algorithm known for its effectiveness in producing optimized schedules, particularly for complex instruction sets.
- modulo-sched
- A type of instruction scheduling algorithm used for optimizing loops, where instructions are scheduled into time steps that repeat cyclically. It aims to find a small loop-carried dependency distance.