An LLVM-based hybrid binary translation system

Bor-Yeh Shen, Jyun-Yan You, Wuu Yang, W. Hsu
{"title":"An LLVM-based hybrid binary translation system","authors":"Bor-Yeh Shen, Jyun-Yan You, Wuu Yang, W. Hsu","doi":"10.1109/SIES.2012.6356589","DOIUrl":null,"url":null,"abstract":"Static binary translation (SBT) systems and dynamic binary translation (DBT) systems have their own merits and disadvantages. SBT can perform whole-program optimizations and do not incur run-time overheads. However, the code discovery and the code location problems caused by indirect branches make SBT systems hard to develop. On the other hand, DBT can perform optimizations based on program's runtime behaviors and can handle indirect branches easily. However, because the translation time accounts for a part of the execution time, DBT systems cannot perform aggressive optimizations. Therefore, quality of the code generated by DBT is not as good as that by SBT. In this paper, we present a hybrid binary translation (HBT) system which combines the merits of both SBT and DBT. It leverages the LLVM infrastructure to translate source binary code, optimize, and generate target binary code. It first translates binary statically. If a run-time exception happens, the HBT system switches to dynamic translation. On the EEMBC benchmark suite, our experimental result shows that the HBT system can run about 4 to 20 times faster than a LLVM-based DBT system.","PeriodicalId":219258,"journal":{"name":"7th IEEE International Symposium on Industrial Embedded Systems (SIES'12)","volume":"148 5 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-06-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"7th IEEE International Symposium on Industrial Embedded Systems (SIES'12)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SIES.2012.6356589","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 15

Abstract

Static binary translation (SBT) systems and dynamic binary translation (DBT) systems have their own merits and disadvantages. SBT can perform whole-program optimizations and do not incur run-time overheads. However, the code discovery and the code location problems caused by indirect branches make SBT systems hard to develop. On the other hand, DBT can perform optimizations based on program's runtime behaviors and can handle indirect branches easily. However, because the translation time accounts for a part of the execution time, DBT systems cannot perform aggressive optimizations. Therefore, quality of the code generated by DBT is not as good as that by SBT. In this paper, we present a hybrid binary translation (HBT) system which combines the merits of both SBT and DBT. It leverages the LLVM infrastructure to translate source binary code, optimize, and generate target binary code. It first translates binary statically. If a run-time exception happens, the HBT system switches to dynamic translation. On the EEMBC benchmark suite, our experimental result shows that the HBT system can run about 4 to 20 times faster than a LLVM-based DBT system.
基于llvm的混合二进制翻译系统
静态二进制翻译(SBT)系统和动态二进制翻译(DBT)系统各有优缺点。SBT可以执行整个程序优化,并且不会产生运行时开销。但是,间接分支所带来的代码发现和代码定位问题,给SBT系统的开发带来了困难。另一方面,DBT可以基于程序的运行时行为执行优化,并且可以轻松地处理间接分支。但是,由于转换时间占执行时间的一部分,DBT系统不能执行激进的优化。因此,DBT生成的代码质量不如SBT生成的代码质量。在本文中,我们提出了一种混合二进制翻译(HBT)系统,它结合了SBT和DBT的优点。它利用LLVM基础架构来转换源二进制代码、优化和生成目标二进制代码。它首先静态地翻译二进制文件。如果发生运行时异常,HBT系统将切换到动态翻译。在EEMBC基准测试套件上,我们的实验结果表明,HBT系统的运行速度比基于llvm的DBT系统快4到20倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术文献互助群
群 号:481959085
Book学术官方微信