GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
risc-v Performance Win

RISC-V: Model ALU scheduling as ALU0 or ALU1 for SpacemiT-X60

Improves RISC-V scheduler for SpacemiT-X60 by modeling ALU instructions to reserve either ALU0 or ALU1.

This commit refines the RISC-V scheduler for the SpacemiT-X60 processor by accurately modeling that ALU instructions utilize only one of the two available Arithmetic Logic Units (ALU0 or ALU1). This change leads to modest performance improvements, particularly noticeable when vector instructions are removed from the -march parameter or when loop unrolling is enabled.

In Details

The SpacemiT-X60 microarchitecture has two ALUs. This change modifies the machine description (.md files) to explicitly model that integer ALU instructions consume either ALU0 or ALU1, rather than assuming a more general resource reservation. This allows the scheduler to make more informed decisions about instruction placement, improving instruction-level parallelism and reducing stalls, especially in loops and code with vector extensions disabled.

For Context
SpacemiT-X60
A specific RISC-V processor core with a dual-issue superscalar pipeline.
ALU
Arithmetic Logic Unit, a digital circuit that performs arithmetic and logical operations.
RISC-V
An open-standard instruction set architecture based on Reduced Instruction Set Computing principles.
Scheduler
A component of the compiler's backend that determines the order of instructions to optimize execution, considering resource availability and dependencies.
Instruction-level parallelism (ILP)
The ability to execute multiple instructions in parallel during a single clock cycle by exploiting independent operations in the instruction stream.
Filed Under: risc-vscheduleroptimizationspacemit-x60