研究生: |
周家宏 Chia-Hung Chou |
---|---|
論文名稱: |
暫存器New-Old Banks機制產生程式碼 Code Generation for Register File with New-Old Banks |
指導教授: |
黃元欣
Yuan-Shin Hwang |
口試委員: |
張榮貴
Rong-Guey Chang 謝仁偉 Jen-Wei Hsieh |
學位類別: |
碩士 Master |
系所名稱: |
電資學院 - 資訊工程系 Department of Computer Science and Information Engineering |
論文出版年: | 2012 |
畢業學年度: | 101 |
語文別: | 中文 |
論文頁數: | 46 |
中文關鍵詞: | 編譯器 、暫存器 、程式碼生成 |
外文關鍵詞: | Compiler, Register, Code Generation |
相關次數: | 點閱:704 下載:1 |
分享至: |
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
在本篇論文中,我們提出了New-Old Register Banks的機制,藉此來增加指令集中所可以使用的實體暫存器數量,使得編譯器或是程式設計師可以使用更多的暫存器來提高程式的效能,在這個方法中,僅利用原始的指令格式配合Register Allocation來達到增加暫存器的目的,並不會因此在格式中增加額外的位元。此方法中,我們將Alpha micro-processor內的暫存器增加8倍,由原本的32顆暫存器增加到256顆暫存器,讓32位元的指令可以不受位元的限制,而使用到更多的暫存器,同時編譯器及程式設計師透過存取這256顆暫存器來提高效能。
此方法中,除了需要一個New-Old Register Banks的Code Generation演算法來對應我們所修改的指令格式外,同時還需要在硬體的部分配合New到Old暫存器搬移的動作,使整個程式可以有效率的利用額外增加的暫存器,以達到提升效能的目的。
We proposed a code generation method with old-new register banks – “Code Generation for Register File with New-Old Banks”. This scheme significantly increasing the number of register which can encode 4x~8x registers with same encoding space. The Compiler can do more aggressive optimization to improve the performance of program, if we have more registers. We use the traditional graph-coloring based register allocation with 2-address format and eliminate move instruction which saves old value of a register. Then we modify hardware to handle old-new value of registers.
We proposed a We proposed a code generation method with old-new register banks to increase physical registers of a processor. In this method, a compiler or a programmer can use more registers to improve performance. We use traditional graph-coloring based register allocation with 2 address format to increase registers, so we increase registers from 32 to 256. It won’t increase extra bits in format in this method. And we need a code generation algorithm to generate code corresponding to our instruction format and we need to modify hardware to handle new-old register. Therefore, we can use extra registers and improve performance.
[1] Alpha. Alpha 21264 Processor Technical Reference Manual. http://www.alpha.com.
[2] ARM. ARM Reference Manual. http://www.arm.com.
[3]SimpleScalar. Simple_tutorial. http://www.simplescalar.com/
[4] X. Zhuang, S. Pande. Differential register allocation, In Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, pages 57-70, 2005.
[5] H.J. Cheng. Paired-Register Allocation, 2011
[6] G. J. Chaitin, et. al., Register allocation via coloring, In Computer Languages, Vol. 6, pages 47-57, Jan. 1981.
[7] P. Briggs, K. D. Cooper, and L. Torczon, Improvements to graph coloring register allocation, In ACM Transactions on Programming Languages and Systems, Vol. 16, No. 3, pages 428-455, May 1994.
[8] A. B. Kempe. On the geographical problem of the four colors. In American Journal of Mathematics, 2(1): pages 193-200, 1879.
[9] J. Park and S.M. Moon. Optimistic register coalescing. In ACM Transactions on Programming Languages and Systems, Vol. 26, No. 4, pages 736-765, 2004.
[10] L. George and A.W. Appel. Iterated register coalescing. In ACM Transactions on Programming Languages and Systems, Vol. 18, No. 3, pages 300-324, 1996.
[11] T. Austin, E. Larson, and D. Emst. Simplescalar: An infrastruc-ture for computer system modeling. In IEEE Computer, 35(2):59–67, 2002.
[12] J.A. Swensen and Y.N. Patt, Hierarchical Registers for Scientific Computers, In Proceedings of the 2nd international conference on Supercomputing, pages. 346-353, 1988.
[13] B. Scholz, B. Burgstaller, and J. Xue. Minimizing Bank Selection Instructions for Partitioned Memory Architectures. In Proceedings of the International Conference on Compilers, Architecture and Synthesis for Embedded Systems, pages. 201-211 2006.
[14] Bernhard Scholz and Erik Eckstein. Register Allocation for Irregular Architectures. In Proceedings of the Joint Conference on Languages, Compilers and Tools for Embedded Sysems, pages 139-148. 2002.
[15] Andrew W. Appel and Lal George. Optimal spilling for CISC machines with few registers. In Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, pages 243–253, 2001.
[16] V. Sarkar and R. Barik. Extended Linear Scan: an Alternate Foundation for Global Register Allocation. In Proceedings of the 16th international conference on Compiler construction (CC’07), pages 141-155, 2007