Interference-Aware Function Inlining for Code Size Reduction

Hsuan Chang, Yi Ping You

研究成果: Conference contribution同行評審

摘要

Reducing the size of code is a significant concern in modern industrial settings. This has led to the exploration of various strategies, including the use of function call inlining via compiler optimizations. However, modern compilers like GCC and LLVM often rely on heuristics, which occasionally yield suboptimal outcomes. As a response to this challenge, autotuning mechanisms have been introduced, one of which is the local inlining autotuner that has received attention in previous research. This autotuner has been found to reduce code size by 4.9% compared to LLVM's -Oz optimization level on SPEC2017 by fine-tuning function inlining decisions. However, the local inlining autotuner has limitations since it refines each function inlining decision individually before combining them, which can lead to complications arising from potential interference between function calls, increasing tuning durations and resulting in larger code sizes. Empirical investigations have revealed that in most cases, the impact of inlining a function call affects nearby function calls, which are referred to as "neighbors."From this observation, we can substantially reduce the recompilation overheads entailed by the autotuner. To tackle the interference problem and expedite the tuning process, we propose an enhanced autotuner for function inlining, called the interference-aware inlining autotuner. This autotuner considers the repercussions of inlining a function call when formulating subsequent decisions and exploits the neighbor relationships between function calls to augment tuning efficiency. Experimental evaluations have validated the effectiveness of the interference-aware inlining autotuner, delivering an average code size reduction of 0.4% (up to 1.5%) across the SPEC2017 benchmark suite compared to the local inlining autotuner. Furthermore, the interference-aware autotuner achieved an average code size reduction of 5.3% compared to LLVM's -Oz optimization level. In terms of tuning time, the serial interference-aware inlining autotuner exhibited a 2.9x acceleration (3.5x for resource-intensive tasks) compared to the parallel local inlining autotuner.

原文English
主出版物標題53rd International Conference on Parallel Processing, ICPP 2024 - Workshops Proceedings
發行者Association for Computing Machinery
頁面7-14
頁數8
ISBN(電子)9798400718021
DOIs
出版狀態Published - 12 8月 2024
事件53rd International Conference on Parallel Processing, ICPP 2024 - Gotland, 瑞典
持續時間: 12 8月 202415 8月 2024

出版系列

名字ACM International Conference Proceeding Series

Conference

Conference53rd International Conference on Parallel Processing, ICPP 2024
國家/地區瑞典
城市Gotland
期間12/08/2415/08/24

指紋

深入研究「Interference-Aware Function Inlining for Code Size Reduction」主題。共同形成了獨特的指紋。

引用此