Research on Link Optimization Technology Based on Function Reordering
Function reordering is a common optimization technique that improves program execution efficiency by adjusting function layout in executable files. This study proposes a novel link-time function reordering algorithm that organizes functions based on clustering, taking into account cluster execution frequency and calling relationships. Initially, the perf tool extracts program profile information, which, along with function call relationships and sizes, is used to construct a call graph (CG) for function clustering. After clustering, the algorithm analyzes inter-cluster calling relationships to identify multiple high-frequency hot chains. Functions are then ordered by outputting function names sequentially from the highest-density chain, establishing the final function order. This algorithm was implemented in Binutils' ld linker. Experimental results show that the proposed algorithm increased program IPC by 1.116%, improved Ll cache hit rate by 1.625%, and reduced execution time by 2.888%. The findings demonstrate that the proposed algorithm can significantly improve execution efficiency at the linking stage.
Authors
- Yagang Wang (ORCID: https://orcid.org/0000-0003-3037-9798)
- Wenjun Wang (ORCID: https://orcid.org/0000-0001-6096-4248)
Institutions
- Xi’an University of Posts and Telecommunications (CN)
Publication Details
- Published
- 2024-11-08
- DOI
- https://doi.org/10.1109/isceic63613.2024.10810229
- Primary Topic
- Simulation and Modeling Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00