Abstract
As most binary translation systems don’t consider the difference of register requirements of basic blocks, which brings redundant memory access instructions caused by unnecessary registers overflow. To solve this problem, a binary translation backend registers allocation algorithm based on priority (BTBRAP) is proposed. Firstly, local global register is allocated statically to reduce the global register maintenance overhead, according to the statistical features of registers on the source platform. Then, the number of every register requested in basic blocks is determined, according to the relationship between intermediate representation and the source platform registers. So the priority of registers allocation is obtained. Conclusively, allocate the registers dynamically based on the priority to reduce the registers overflow. As the test results of nbench, representative recursive programs and SPEC2006 show, the algorithm effectively reduces the redundant memory access of local code, and improves the program performance with an average increase of 7.94%.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Altman, E.R., Kaeli, D., Sheffer, Y.: Welcome to the opportunities of binary translation. J. Comput. 33(3), 40–45 (2000)
Ma, J., Li, Z., Hu, C., et al.: A reconstruction method of type abstraction in binary code. J. Comput. Res. Dev. 50(11), 2418–2428 (2013)
Chen, J.S., Lan, X.H., Wei, Z.: Software transplant based on instruction simulation. J. Electron. Instrum. Customer (2010)
Muth, R.: Register liveness analysis of executable code. Manuscript, Department of Computer Science, the University of Arizona, December 1998
Ma, X., Wu, C., Tang, F., et al.: Two condition code optimization approaches in binary translation. J. Comput. Res. Dev. 42(2), 329–337 (2005)
Liang, A., Guan, H., Li, Z.: A research on register mapping strategies of QEMU. In: 2nd International Symposium on Intelligence Computation and Application (2007)
Wen, Y., Tang, D., Ql, F.: Register mapping and register function cutting out implementation in binary translation. J. Softw. 20(2), 1–7 (2009)
Liao, Y., Sun Z.G., Jiang, H., et al.: All registers direct mapping method in dynamic binary translation. J. Comput. Appl. Softw. 28(11), 21–24 (2011)
Cai, Z., Liang, A., Qi, Z., et al.: Performance comparison of register allocation algorithms in dynamic binary translation. In: International Conference on Knowledge and Systems Engineering, pp. 113–119. IEEE (2009)
Liang, Y., Shao, Y., Yang, G., et al.: Register allocation for QEMU dynamic binary translation systems. Int. J. Hybrid Inf. Technol. 8(2), 199–210 (2015)
Bellard, F.C.: QEMU, a fast and portable dynamic translator. In: Conference on Usenix Technical Conference, p. 41. USE-NIX Association (2005)
Jiang, J., Wang, C., Wei, H.: An optimization strategy for local register allocation. J. Comput. Appl. Softw. 12, 215–217 (2013)
Zhang, X., Guo, X., Zhao, L.: Study on TCG dynamic binary translation technique. J. Comput. Appl. Softw. 30(11), 34–37 (2013)
Dai, T., Shan, Z., Lu, S., et al.: Register allocation algorithm of dynamic binary translation based on priority. J. Zhejiang Univ. (Eng. Sci.) 50(1), 158–165 (2016)
Smith, T.F., Waterman, M.S.: Identification of common molecular subsequences. J. Mol. Biol. 147, 195–197 (1981)
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Wang, J., Pang, J., Fu, L., Shan, Z., Yue, F., Zhang, J. (2018). A Binary Translation Backend Registers Allocation Algorithm Based on Priority. In: Yuan, H., Geng, J., Liu, C., Bian, F., Surapunt, T. (eds) Geo-Spatial Knowledge and Intelligence. GSKI 2017. Communications in Computer and Information Science, vol 849. Springer, Singapore. https://doi.org/10.1007/978-981-13-0896-3_41
Download citation
DOI: https://doi.org/10.1007/978-981-13-0896-3_41
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-0895-6
Online ISBN: 978-981-13-0896-3
eBook Packages: Computer ScienceComputer Science (R0)