跳到主要內容

臺灣博碩士論文加值系統

(44.201.94.236) 您好!臺灣時間:2023/03/24 12:22
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:彭詠靖
研究生(外文):Yung-Ching Peng
論文名稱:支援GCC RTL表示式之別名分析之實作
論文名稱(外文):Implementation of an Alias Analysis for GCC RTL Representation
指導教授:陳鵬升陳鵬升引用關係
指導教授(外文):Peng-Sheng Chen
口試委員:張雲龍張榮貴林迺衛陳鵬升
口試委員(外文):Weng-Long ChangRong-Guey ChangNai-Wei LinPeng-Sheng Chen
口試日期:2014-06-30
學位類別:碩士
校院名稱:國立中正大學
系所名稱:資訊工程研究所
學門:工程學門
學類:電資工程學類
論文種類:學術論文
論文出版年:2014
畢業學年度:102
語文別:英文
論文頁數:71
中文關鍵詞:別名分析編譯器最佳化
外文關鍵詞:alias analysiscompiler optimizationGCCRTL
相關次數:
  • 被引用被引用:0
  • 點閱點閱:625
  • 評分評分:
  • 下載下載:21
  • 收藏至我的研究室書目清單書目收藏:0
別名分析 (alias analysis) 在編譯器上,是用來決定兩次記憶體存取是否會參考到相同的記憶體位址的一個機制。編譯器在執行最佳化階段時會使用到別名分析的結果來產生有效率的程式碼。
GCC (GNU Compiler Collection) 是一個compiler infrastructure。由於GCC擁有一些特性像是開放原始碼、有效率的目的碼與可移植性,使得GCC廣泛應用在不同的領域上。在GCC編譯過程中,GCC會先剖析原始碼,然後轉換成高階中間語言 (intermediate language),GENERIC與GIMPLE,接著轉換成低階中間語言RTL,最後由RTL產生目標組合語言。
我們的研究是在GCC的中間語言RTL (Register Transfer Language) 上實作intra-procedural flow-sensitive的別名分析。我們實作的別名分析演算法是基礎於Debray所提出的residue-based alias analysis並再加入RTL中的memory region的資訊用以協助判斷別名關係。我們在GCC中實作本研究提出的別名分析演算法並且整合分析結果於RTL的最佳化pass,像是dead store elimination與instruction scheduling。
我們從SPEC CPU2006中選擇7個benchmark程式做為實驗評估。由實驗分析結果得知,在效能上,我們提出的別名分析演算法與原來在GCC RTL-level的別名分析方法是相差無幾。此篇研究協助我們了解,在GCC RTL-level的alias analysis如何與RTL最佳化pass互動,並且提供了可用的資訊給未來在RTL-level的alias analysis研究。
Alias analysis determines whether a memory address may be accessed by separate memory references. Many compiler optimizations rely on alias analysis results to provide better effectiveness. GCC (GNU compiler collection) is a popular compiler infrastructure with the features of open source (GNU GPLv3), high code quality, and portability. During the GCC compilation, a source program is parsed and transferred to the high-level intermediate representations (IR), GENERIC and GIMPLE, and then lowered to the low-level IR, RTL, and finally translated to target assembly codes.
In this thesis, we develop an intra-procedural, flow-sensitive alias analysis on GCC RTL. The proposed alias analysis algorithm is based on the residue-based global alias analysis. We enhance the method by adding memory region information to help memory disambiguation. The proposed algorithm is implemented based on GCC and properly integrated with GCC RTL-level optimizations: dead store elimination and instruction scheduling. Seven benchmark programs selected from SPEC CPU 2006 are used for the evaluation. The experimental results show that the proposed algorithm has similar results as the original GCC RTL-level alias analysis. This study can help us to understand the original GCC alias analysis and its interaction with RTL-level optimizations. In addition, this study provides useful information to further improve GCC RTL-level alias analysis.
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
1.2 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
1.3 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Chapter 2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
2.1 residue-based alias analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
2.2 GCC and RTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
2.3 RTL representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Chapter 3 Design and Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
3.1 Address Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
3.2 Memory region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
3.3 Candidate instructions and transfer functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
3.4 Intra-procedural alias analysis algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
3.5 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
3.6 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Chapter 4 Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
4.1 Experiment on x86 platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
4.2 Experiment on IA-64 platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
Chapter 5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70
[1] A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman, Compilers: Principles, Techniques, and Tools, vol. 1009. Addison-Wesley, 2nd ed., 2007.

[2] GCC. GCC, the GNU Compiler Collection - GNU project - Free software Foundation (FSF). http://gcc.gnu.org. [Online; accessed 17-June-2014].

[3] GCC. GNU Compiler Collection (GCC) Internals. https://gcc.gnu.org. [Online; accessed 17-June-2014].

[4] Jason Merrill, GENERIC and GIMPLE: A new tree representation for entire functions. In Proceedings of the 2003 GCC Development’s Summit, pages 171-193, 2003.

[5] GCC. RTL - GNU Compiler Collections (GCC) Internals. https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gccint/RTL.html#RTL. [Online;
accessed 17-June-2014].

[6] S. Debray, R. Muth, and M. Weippert, “Alias analysis of executable code,” in Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, POPL ’98, (New York, NY, USA), pp. 12-24, ACM,1998.

[7] GCC. Using the GNU Compilers Collection (GCC). https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/. [Online; accessed 17-June-2014].

[8] GCC Resource Center. GCC Resource Center for GCC Internals. http://www.cse.iitb.ac.in/grc/. [Online; accessed 17-June-2014].

[9] GCC. RTL Objects - GNU Compiler Collection (GCC) Internals. https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gccint/RTL-Objects.html#RTL-Objects. [Online; accessed 17-June-2014].

[10] GCC. Insns - GNU Compiler Collection (GCC) Internals. https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gccint/Insns.html#Insns. [Online; accessed 22-June-2014].

[11] GCC. Downloading GCC - GNU Project - Free software Foundation (FSF). https://gcc.gnu.org/install/download.html. [Online; accessed 17-June-2014].

[12] Standard Performance Evaluation Corporation. SPEC CPU2006. http://www.spec.org/cpu2006/. [Online; accessed 17-June-2014].

[13] Standard Performance Evaluation Corporation. SPEC CINT006 Benchmark Descriptions. http://www.spec.org/cpu2006/CINT2006/. [Online; accessed 17-June-2014].

[14] Standard Performance Evaluation Corporation. SPEC CFP2006 Benchmark Descriptions. http://www.spec.org/cpu2006/CFP2006/. [Online; accessed 17-June-2014].

[15] Sanjiv K. Gupta and Naveen Sharma, Alias Analysis for Intermediate Code. In Proceedings of the 2003 GCC Development’s Summit, pages 71-78, 2003.
QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top