摘要
二进制翻译是实现软件移植的主要方法.动态二进制翻译受动态执行限制而不能深度优化导致效率较低而传统的静态二进制翻译难以处理间接分支,且现有的优化方法大部分集中在中间代码层,对目标码中存在的大量冗余指令较少关注.针对这一现状,提出一种静态二进制翻译框架SQEMU,基于该框架提出了一种对目标码冗余指令进行删除的优化算法.该算法通过分析目标码生成指令特定数据依赖图(instruction-specific data dependence graph,IDDG),再利用该图将活性分析和窥孔优化的2种理论相结合,有效删除目标码中的冗余指令.实验结果表明,利用该算法对目标码优化后,其执行效率得到显著提升,最大提升可达42%,整体性能测试表明,优化后nbench测试集翻译效率提高约20%,SPEC CINT2006测试集翻译效率提高约17%.
Binary translation is a main method to implement software migration. Dynamic binary translation is limited by dynamic execution and cannot be deeply optimized, resulting in low efficiency. Traditional static binary translation has difficulty to deal with indirect branch, and conventional optimization methods mostly affect in the intermediate code layer, paying less attention to a large number of redundant instructions that exist in the target code. According to this situation, this paper presents a static binary translation framework SQEMU and a target code optimization algorithm to delete redundant instructions based on the framework. The algorithm generates an instruction-specific data dependence graph (IDDG) based on the analysis of target codes, then combines liveness analysis with peephole optimization using IDDG, and effectively removes redundant instructions in target codes. Experimental results show that using the optimization algorithm for target codes, the execution efficiency is significantly increased, the maximal increase up to 42% , and the overall performance test shows that the optimized translation efficiency of nbench is increased by about 20% on average, and it is increased about 17% of SPEC CINT2006 on average.
出处
《计算机研究与发展》
EI
CSCD
北大核心
2017年第9期1931-1944,共14页
Journal of Computer Research and Development
基金
国家自然科学基金项目(61472447)
国家"八六三"高技术研究发展计划基金项目(2009AA012201)
"核高基"国家科技重大专项基金项目(2009ZX01036-001-001)~~
关键词
二进制翻译
冗余指令
活性分析
窥孔优化
SQEMU框架
binary translation
redundant instruction
liveness analysis
peephole optimization
SQEMU frame