Abstract
From IoT devices to datacenters, code size is important, motivating ongoing research in binary reduction. A key technique is the merging of similar functions to reduce code redundancy. Success, however, depends on accurately identifying functions that can be profitably merged. Attempting to merge all function pairs is prohibitively expensive. Current approaches, therefore, employ summaries to estimate similarity. However these summaries often give little information about how well two programs will merge. To make things worse, they rely on exhaustive search across all summaries; impractical for realworld programs.
In this work, we propose a new technique for matching similar functions. We use a hash-based approach that better captures code similarity and, at the same time, significantly reduces the search space by focusing on the most promising candidates. Experimental results show that our similarity metric has a better correlation with merging profitability. This improves the average code size reduction by 6 percentage points, while it reduces the overhead of function merging by 1.8x on average and by as much as 597x for large applications. Faster merging and reduced code size to compile at later stages mean that our approach introduces little to no compile time overhead, while in many cases it makes compilation faster by up to 30%.
In this work, we propose a new technique for matching similar functions. We use a hash-based approach that better captures code similarity and, at the same time, significantly reduces the search space by focusing on the most promising candidates. Experimental results show that our similarity metric has a better correlation with merging profitability. This improves the average code size reduction by 6 percentage points, while it reduces the overhead of function merging by 1.8x on average and by as much as 597x for large applications. Faster merging and reduced code size to compile at later stages mean that our approach introduces little to no compile time overhead, while in many cases it makes compilation faster by up to 30%.
Original language | English |
---|---|
Title of host publication | 2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO) |
Publisher | IEEE |
DOIs | |
Publication status | Published - 6 Apr 2022 |
Fingerprint
Dive into the research topics of 'F3M: Fast Focused Function Merging'. Together they form a unique fingerprint.Datasets
-
Artifact for F3M: Fast Focused Function Merging
Petoumenos, P. (Creator), Rocha, R. (Creator) & Stirling, S. (Creator), University of Manchester Figshare, 14 Dec 2021
DOI: 10.48420/17041502.v1, https://figshare.manchester.ac.uk/articles/software/Artifact_for_F3M_Fast_Focused_Function_Merging/17041502/1
Dataset