Projects per year
Abstract
Function merging is an important optimization for reducing code size. This technique eliminates redundant code across functions by merging them into a single function. While initially limited to identical or trivially similar functions, the most recent approach can identify all merging opportunities in arbitrary pairs of functions. However, this approach has a serious limitation which prevents it from reaching its full potential. Because it cannot handle phi-nodes, the state-of-the-art applies register demotion to eliminate them before applying its core algorithm. While a superficially minor workaround, this has a three-fold negative effect: by artificially lengthening the instruction sequences to be aligned, it hinders the identification of mergeable instruction; it prevents a vast number of functions from being profitably merged; it increases compilation overheads, both in terms of compile-time and memory usage.
We present SalSSA, a novel approach that fully supports the SSA form, removing any need for register demotion. By doing so, we notably increase the number of profitably merged functions. We implement SalSSA in LLVM and apply it to the SPEC 2006 and 2017 suites. Experimental results show that our approach delivers on average, 7.9% to 9.7% reduction on the final size of the compiled code. This translates to around 2×more code size reduction over the state-of-the-art. Moreover, as a result of aligning shorter sequences of instructions and reducing the number of wasteful merge operations, our new approach incurs an average compile-time overhead of only 5%, 3× less than the state-of-the-art, while also reducing memory usage by over 2×.
We present SalSSA, a novel approach that fully supports the SSA form, removing any need for register demotion. By doing so, we notably increase the number of profitably merged functions. We implement SalSSA in LLVM and apply it to the SPEC 2006 and 2017 suites. Experimental results show that our approach delivers on average, 7.9% to 9.7% reduction on the final size of the compiled code. This translates to around 2×more code size reduction over the state-of-the-art. Moreover, as a result of aligning shorter sequences of instructions and reducing the number of wasteful merge operations, our new approach incurs an average compile-time overhead of only 5%, 3× less than the state-of-the-art, while also reducing memory usage by over 2×.
| Original language | English |
|---|---|
| Title of host publication | Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation |
| Publisher | Association for Computing Machinery (ACM) |
| Pages | 854-868 |
| Number of pages | 15 |
| ISBN (Electronic) | 9781450376136 |
| DOIs | |
| Publication status | Published - 11 Jun 2020 |
| Event | 41st ACM SIGPLAN Conference on Programming Language Design and Implementation - London, United Kingdom Duration: 15 Jun 2020 → 20 Jun 2020 Conference number: 41 https://conf.researchr.org/home/pldi-2020 |
Conference
| Conference | 41st ACM SIGPLAN Conference on Programming Language Design and Implementation |
|---|---|
| Abbreviated title | PLDI 2020 |
| Country/Territory | United Kingdom |
| City | London |
| Period | 15/06/20 → 20/06/20 |
| Internet address |
Keywords / Materials (for Non-textual outputs)
- Code Size Reduction
- Function Merging
- LTO
Fingerprint
Dive into the research topics of 'Effective Function Merging in the SSA Form'. Together they form a unique fingerprint.Projects
- 1 Finished
-
SUMMER:SchedUling on heterogeneous Mobile Multicores based on quality of ExpeRience
Leather, H. (Principal Investigator)
31/12/16 → 30/12/18
Project: Research
Profiles
-
Murray Cole
- School of Informatics - Personal Chair of Patterned Parallel Computing
- Institute for Computing Systems Architecture
- Computer Systems
Person: Academic: Research Active