Abstract
Register allocation is a very important part of compiler optimization, and there are plenty of researchers doing good work on it. In this paper, we use the game theory to build a register allocation model. We map the register allocation to the post election problem. The registers are mapped to posts and the variables are mapped to candidates of the post. So the register allocation problem can be considered as the post to assign for the candidates. We use a simple example to illustrate the game model based algorithm and compared it with linear scan algorithm, and it can be easily to find that we can get better results in the quality of the produced code.
This work is supported by the Fundamental Research Funds for the Central Universities Grant #211276401 and PhD Independent Research Fund by Wuhan University Grant #20102110201000097 to Chen Yong.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Chaitin, G.J.: Register allocation and spilling via graph coloring. US Patent 4,571,678 (February 18, 1986)
Chaitin, G.J., Auslander, M.A., Chandra, A.K., Cocke, J., Hopkins, M.E., Markstein, P.W.: Register allocation via coloring. Computer Languages 6(1), 47–57 (1981)
Hames, L., Scholz, B.: Nearly optimal register allocation with PBQP. Modular Programming Languages, pp. 346–361 (2006)
Koes, D., Goldstein, S.C.: A progressive register allocator for irregular architectures. In: Proceedings of the International Symposium on Code Generation and Optimization, pp. 269–280. IEEE Computer Society, Los Alamitos (2005)
Lee, J.K., Palsberg, J., Pereira, F.M.Q.: Aliased register allocation for straight-line programs is NP-complete. Theoretical Computer Science 407(1-3), 258–273 (2008)
Naik, M., Palsberg, J.: Compiling with code-size constraints. ACM Transactions on Embedded Computing Systems (TECS) 3(1), 163–181 (2004)
Palsberg, J., Pereira, F.M.Q.: Register allocation by puzzle solving. US Patent App. 12/234,635 (September 20, 2008)
Pereira, F., Palsberg, J.: Register allocation via coloring of chordal graphs. Programming Languages and Systems, pp. 315–329 (2005)
Poletto, M., Sarkar, V.: Linear scan register allocation. ACM Transactions on Programming Languages and Systems (TOPLAS) 21(5), 895–913 (1999)
Rong, H.: Tree register allocation. In: MICRO42. 42nd Annual IEEE/ACM International Symposium on Microarchitecture 2009, pp. 67–77. IEEE, Los Alamitos (2010)
Smith, M.D., Ramsey, N., Holloway, G.: A generalized algorithm for graph-coloring register allocation. In: Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, pp. 277–288. ACM, New York (2004)
Traub, O., Holloway, G., Smith, M.D.: Quality and speed in linearscan register allocation. In: Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, pp. 142–151. ACM, New York (1998)
Wimmer, C., Franz, M.: Linear scan register allocation on SSA form. In: Proceedings of the 8th Annual IEEE/ACM International Symposium on Code Generation and Optimization, pp. 170–179. ACM, New York (2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Yong, C., Yanxiang, H., Wei, W., Qing’an, L. (2011). Game Model Based Register Allocation. In: Zhang, J. (eds) Applied Informatics and Communication. ICAIC 2011. Communications in Computer and Information Science, vol 227. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-23226-8_35
Download citation
DOI: https://doi.org/10.1007/978-3-642-23226-8_35
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-23225-1
Online ISBN: 978-3-642-23226-8
eBook Packages: Computer ScienceComputer Science (R0)