CT_00_033 -- New instruction fusions
About
Instruction fusion is an important technique to improve performance of RISC-V systems. While GCC has support for a common set of instruction fusions, it's believed that additional cases will become more important as new designs come to market.
- Store pair fusions. Right now GCC only supports fusion of two 64 bit stores to aligned addresses. Newer designs are expected to be able to fuse pairs of same sized stores fairly aggressively.
- Address calculations with memory references. Right now GCC supports a limited set fusions of address arithmetic with a memory reference. Newer designs are expected to be able to fuse nearly every add/shadd with a subsequent memory reference.
- Zero extended bitfield extractions. Right now GCC supports a small subset of bitfield extractions when implemented via shifts. The shift counts are fairly restrictive.
- Newer designs are expected to fuse these operations very aggressively.
- The compiler should rewrite a right shift + masking off upper bits as a left shift + right logical shift to facilitate fusion.
- Left shift + add (shift count > 3) are expected to be fusible in the near future. As are shifts followed by other non-shift ALU ops, including 'w' variants.
- Others may show up over time.
Stakeholders/Partners
RISE:
Ventana: Jeff Law. Oversight/guidance
Ventana: Daniel Barboza: Implementation
External:
Dependencies
Status
Updates
- Daniel Barboza is working part-time on implementing the new fusions along with testcases
- Some technical hurdles, but they're being worked through. Nothing that appears to be show stopping
- Project added as priority for 2H 2024.