Low-level optimizations using SSA form in GNU Compiler Collection

Ondřej Machota · Digital Repository (National Repository of Grey Literature) · 2025

Compiler optimizations are a fundamental part of the compilation process. A widely adopted foundation for many optimizations is Static Single Assignment (SSA) form, which provides a clear and efficient way to represent data flow. Although SSA form has played a key role in GCC's high-level optimizations since GIMPLE was introduced, most low-level optimizations on RTL still rely on traditional dataflow analysis. This thesis explores the RTL SSA framework in the GNU Compiler Collection (GCC) and its suitability for imple- menting low-level optimizations. The focus is on implementing a dead code elimination pass using the RTL SSA framework, aiming to replace the existing use-def chain-based approach. The resulting pass achieves nearly equivalent results as the existing implemen- tation and supports full GCC bootstrapping, indicating correctness and stability.

Read the paper · More papers on PaperTik