GCC Compiler Code Size Density
summary
Western Digital engineers port a real embedded product to RISC‑V and compare GCC 8.2 output against a legacy vendor controller, find two hot problems: unnecessary save/restore around calls (missing tail‑call elimination) and failure to rebase addresses so loads/stores use 32‑bit rather than compressed-friendly offsets. Patches remove redundant prolog/epilog, add address rebasing for memory streams and yield about 5% overall code‑size improvement, with up to 10% savings in a tested stream and theoretical up to 50% in repetitive load/store sequences. Plans include applying similar work to LLVM and adding outlining and new embench testcases.
AI-written summary · about
chapters (6)
related talks
20mAnalysis for Code Size Opportunities in RISC V
18mPreview RISC-V GCC Features and Optimization Improvements for GCC-14
17mRecent Developments in Optimizing Compilers for RISC-V
15mCompared Analysis of GCC Codegen for AArch64 and RISC-V
24mRISC V LLVM: Towards A Production-Ready LLVM-Based Toolchain
38mOptimized String Processing in RISC-V: How Toolchain Improvements Can Boost Performance
45mA Few Effective gcc/clang Optimizations for Embedded Systems
17mUnlocking 15% More Performance: A Case Study in LLVM Optimization for RISC-V
