Effective function merging in the SSA form
Effective function merging in the SSA form
复制标题
SSA形式的有效功能合并
DOI:
10.1145/3385412.3386030
复制
发表时间:
2020
期刊:
影响因子:
--
通讯作者:
Rocha R
中科院分区:
文献类型:
--
作者:
Rocha R
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.
登录
查看更多内容
DOI:
--
发表时间:
2009
期刊:
International Conference on Compiler Construction
影响因子:
--
作者:
Fernando Magno Quintão Pereira;J. Palsberg
通讯作者:
J. Palsberg
DOI:
--
发表时间:
2020
期刊:
影响因子:
--
作者:
Rodrigo C. O. Rocha;Pavlos Petoumenos;Z. Wang;M. Cole;Hugh Leather
通讯作者:
Hugh Leather
DOI:
10.5555/3314872.3314892
发表时间:
2019-02
期刊:
2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)
影响因子:
--
作者:
Rodrigo C. O. Rocha;Pavlos Petoumenos;Zheng Wang;M. Cole;Hugh Leather
通讯作者:
Rodrigo C. O. Rocha;Pavlos Petoumenos;Zheng Wang;M. Cole;Hugh Leather
DOI:
--
发表时间:
2006
期刊:
影响因子:
--
作者:
Fang Yu
通讯作者:
Fang Yu
DOI:
--
发表时间:
2019
期刊:
IEEE/ACM International Symposium on Code Generation and Optimization
影响因子:
--
作者:
Vasileios Porpodas;Rodrigo C. O. Rocha;E. Brevnov;L. F. Góes;T. Mattson
通讯作者:
T. Mattson