Write a Blog >>
PLDI 2020
Mon 15 - Fri 19 June 2020
Thu 18 Jun 2020 13:40 - 14:00 at PLDI Research Papers live stream - Code Generation Chair(s): Fan Long

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 2x 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%, 3x less than the state-of-the-art, while also reducing memory usage by over 2x.

Thu 18 Jun
Times are displayed in time zone: (GMT-07:00) Pacific Time (US & Canada) change

pldi-2020-papers
13:00 - 14:00: PLDI Research Papers - Code Generation at PLDI Research Papers live stream
Chair(s): Fan LongUniversity of Toronto

YouTube lightning session video

pldi-2020-papers13:00 - 13:20
Talk
Stephen ChouMassachusetts Institute of Technology, USA, Fredrik KjolstadStanford University, Saman AmarasingheMassachusetts Institute of Technology, USA
Pre-print
pldi-2020-papers13:20 - 13:40
Talk
Ankush PhuliaIIT Delhi, India, Vaibhav BhageeIIT Delhi, India, Sorav BansalIIT Delhi, India
pldi-2020-papers13:40 - 14:00
Talk
Rodrigo C. O. RochaUniversity of Edinburgh, UK, Pavlos PetoumenosUniversity of Manchester, UK, Zheng WangUniversity of Leeds, UK, Murray ColeUniversity of Edinburgh, UK, Hugh LeatherUniversity of Edinburgh, UK