arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2211.09285cs.PL
收藏

优化移动应用程序的功能布局

Optimizing Function Layout for Mobile Applications

Ellis Hoag, Kyungwoo Lee, Julián Mestre, Sergey Pupyrev

摘要:

函数布局,也称为函数重新排序或函数放置,是最有效的配置文件引导编译器优化之一。通过在二进制文件中重新排序函数,编译器能够极大地提高大规模应用程序的性能或减少移动应用程序的压缩大小。虽然这项技术已经在大规模二进制文件的背景下进行了研究,但最近没有研究调查了功能布局对移动应用程序的影响。在本文中,我们开发了第一个原则性的解决方案,优化功能布局的移动空间。为此,我们确定了两个重要的优化目标,压缩代码大小和冷启动时间待用时间的移动应用程序。然后,我们提出了一个正式的模型布局问题,其目标密切配合的目标。我们的新算法来优化布局的灵感来自于经典的平衡图划分问题。我们精心设计并在开源编译器LLVM中实现了该算法。在大型商业移动应用程序上对新方法进行的广泛评估表明,在最先进的方法之上,压缩大小减少了2%,启动待用时间改善了3%。

英文摘要:

Function layout, also referred to as function reordering or function placement, is one of the most effective profile-guided compiler optimizations. By reordering functions in a binary, compilers are able to greatly improve the performance of large-scale applications or reduce the compressed size of mobile applications. Although the technique has been studied in the context of large-scale binaries, no recent study has investigated the impact of function layout on mobile applications. In this paper we develop the first principled solution for optimizing function layouts in the mobile space. To this end, we identify two important optimization goals, the compressed code size and the cold start-up time of a mobile application. Then we propose a formal model for the layout problem, whose objective closely matches the goals. Our novel algorithm to optimize the layout is inspired by the classic balanced graph partitioning problem. We carefully engineer and implement the algorithm in an open source compiler, LLVM. An extensive evaluation of the new method on large commercial mobile applications indicates up to 2% compressed size reduction and up to 3% start-up time improvement on top of the state-of-the-art approach.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑