跟踪寄存器分配策略:编译时与性能权衡

J. Eisl, Stefan Marr, Thomas Würthinger, H. Mössenböck
{"title":"跟踪寄存器分配策略:编译时与性能权衡","authors":"J. Eisl, Stefan Marr, Thomas Würthinger, H. Mössenböck","doi":"10.1145/3132190.3132209","DOIUrl":null,"url":null,"abstract":"Register allocation is an integral part of compilation, regardless of whether a compiler aims for fast compilation or optimal code quality. State-of-the-art dynamic compilers often use global register allocation approaches such as linear scan. Recent results suggest that non-global trace-based register allocation approaches can compete with global approaches in terms of allocation quality. Instead of processing the whole compilation unit (i.e., method) at once, a trace-based register allocator divides the problem into linear code segments, called traces. In this work, we present a register allocation framework that can exploit the additional flexibility of traces to select different allocation strategies based on the characteristics of a trace. This provides us with fine-grained control over the trade-off between compile time and peak performance in a just-in-time compiler. Our framework features three allocation strategies: a linear-scan-based approach that achieves good code quality, a single-pass bottom-up strategy that aims for short allocation times, and an allocator for trivial traces. To demonstrate the flexibility of the framework, we select 8 allocation policies and show their impact on compile time and peak performance. This approach can reduce allocation time by 7%--43% at a peak performance penalty of about 1%--11% on average. For systems that do not focus on peak performance, our approach allows to adjust the time spent for register allocation, and therefore the overall compilation time, thus finding the optimal balance between compile time and peak performance according to an application's requirements.","PeriodicalId":157584,"journal":{"name":"Proceedings of the 14th International Conference on Managed Languages and Runtimes","volume":"81 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-09-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Trace Register Allocation Policies: Compile-time vs. Performance Trade-offs\",\"authors\":\"J. Eisl, Stefan Marr, Thomas Würthinger, H. Mössenböck\",\"doi\":\"10.1145/3132190.3132209\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Register allocation is an integral part of compilation, regardless of whether a compiler aims for fast compilation or optimal code quality. State-of-the-art dynamic compilers often use global register allocation approaches such as linear scan. Recent results suggest that non-global trace-based register allocation approaches can compete with global approaches in terms of allocation quality. Instead of processing the whole compilation unit (i.e., method) at once, a trace-based register allocator divides the problem into linear code segments, called traces. In this work, we present a register allocation framework that can exploit the additional flexibility of traces to select different allocation strategies based on the characteristics of a trace. This provides us with fine-grained control over the trade-off between compile time and peak performance in a just-in-time compiler. Our framework features three allocation strategies: a linear-scan-based approach that achieves good code quality, a single-pass bottom-up strategy that aims for short allocation times, and an allocator for trivial traces. To demonstrate the flexibility of the framework, we select 8 allocation policies and show their impact on compile time and peak performance. This approach can reduce allocation time by 7%--43% at a peak performance penalty of about 1%--11% on average. For systems that do not focus on peak performance, our approach allows to adjust the time spent for register allocation, and therefore the overall compilation time, thus finding the optimal balance between compile time and peak performance according to an application's requirements.\",\"PeriodicalId\":157584,\"journal\":{\"name\":\"Proceedings of the 14th International Conference on Managed Languages and Runtimes\",\"volume\":\"81 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-09-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 14th International Conference on Managed Languages and Runtimes\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3132190.3132209\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 14th International Conference on Managed Languages and Runtimes","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3132190.3132209","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

摘要

无论编译器的目标是快速编译还是优化代码质量,寄存器分配都是编译的一个组成部分。最先进的动态编译器通常使用全局寄存器分配方法,如线性扫描。最近的研究结果表明,非全局基于跟踪的寄存器分配方法在分配质量方面可以与全局方法竞争。与一次性处理整个编译单元(即方法)不同,基于跟踪的寄存器分配器将问题划分为称为跟踪的线性代码段。在这项工作中,我们提出了一个寄存器分配框架,该框架可以利用跟踪的额外灵活性,根据跟踪的特征选择不同的分配策略。这为我们提供了对实时编译器中编译时间和峰值性能之间权衡的细粒度控制。我们的框架具有三种分配策略:一种基于线性扫描的方法,可实现良好的代码质量,一种单遍自底向上的策略,旨在缩短分配时间,以及一种用于琐碎跟踪的分配器。为了展示框架的灵活性,我们选择了8种分配策略,并展示了它们对编译时间和峰值性能的影响。这种方法可以减少7%- 43%的分配时间,峰值性能损失平均约为1%- 11%。对于不关注峰值性能的系统,我们的方法允许调整用于寄存器分配的时间,从而调整总体编译时间,从而根据应用程序的需求找到编译时间和峰值性能之间的最佳平衡。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Trace Register Allocation Policies: Compile-time vs. Performance Trade-offs
Register allocation is an integral part of compilation, regardless of whether a compiler aims for fast compilation or optimal code quality. State-of-the-art dynamic compilers often use global register allocation approaches such as linear scan. Recent results suggest that non-global trace-based register allocation approaches can compete with global approaches in terms of allocation quality. Instead of processing the whole compilation unit (i.e., method) at once, a trace-based register allocator divides the problem into linear code segments, called traces. In this work, we present a register allocation framework that can exploit the additional flexibility of traces to select different allocation strategies based on the characteristics of a trace. This provides us with fine-grained control over the trade-off between compile time and peak performance in a just-in-time compiler. Our framework features three allocation strategies: a linear-scan-based approach that achieves good code quality, a single-pass bottom-up strategy that aims for short allocation times, and an allocator for trivial traces. To demonstrate the flexibility of the framework, we select 8 allocation policies and show their impact on compile time and peak performance. This approach can reduce allocation time by 7%--43% at a peak performance penalty of about 1%--11% on average. For systems that do not focus on peak performance, our approach allows to adjust the time spent for register allocation, and therefore the overall compilation time, thus finding the optimal balance between compile time and peak performance according to an application's requirements.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信