Landing: 9f10da9d1453
Project / Subsystem
gcc / risc-v
Date
2026-05-19
Author
Jin Ma
Commit
9f10da9d14534a0c68916543fbf8eebfa323ce53
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- risc-v
- patch_id
- —
- commit_hash
- 9f10da9d14534a0c68916543fbf8eebfa323ce53
- source_type
- github
- headline
- RISC-V: Use table-driven dispatch in riscv-fusion.cc.
- tldr
- The RISC-V macro fusion logic now uses a table-driven approach to simplify and extend instruction fusion.
- author
- Jin Ma
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • risc-v
- • optimization
- • code quality
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-19T00:00:00.000Z
The RISC-V macro fusion logic in riscv-fusion.cc was refactored to use a table-driven dispatch. Each fusion case is now a static checker function, and a struct array drives the dispatch loop. This change simplifies the code and makes it easier to add new fusion rules, such as those for branch instructions. Boolean helper functions were renamed to use the _p suffix per GNU/GCC convention.