帳號:guest(3.128.197.9)          離開系統
字體大小: 字級放大   字級縮小   預設字形  

詳目顯示

以作者查詢圖書館館藏以作者查詢臺灣博碩士論文系統以作者查詢全國書目
作者(中文):何立安
作者(外文):Her, Li-An
論文名稱(中文):PREDAF:以GVN處理PRE問題
論文名稱(外文):PREDAF: Global Value Numbering for Partial Redundancy Elimination
指導教授(中文):李政崑
指導教授(外文):Lee, Jenq-Kuen
口試委員(中文):陳鵬升
王紹仲
口試委員(外文):Chen, Peng-Sheng
Wang, Shao-Chung
學位類別:碩士
校院名稱:國立清華大學
系所名稱:資訊工程學系
學號:106062572
出版年(民國):108
畢業學年度:107
語文別:英文
論文頁數:35
中文關鍵詞:GVNPREDAF向量
外文關鍵詞:GVNPREDAFvector
相關次數:
  • 推薦推薦:0
  • 點閱點閱:411
  • 評分評分:*****
  • 下載下載:0
  • 收藏收藏:0
當今應用之大量運算,以其硬體技術之革新。運算之繁重,效能優化愈發重要。當今編譯器研究,在消滅冗餘運算,然則時有功敗垂成,譬如部分冗餘消滅(PRE)。其主因在於節點與節點間,編譯信息傳遞練之斷裂。而向量之介入,情勢急轉直下,以其天生之swizzle運算。
當此,於此篇論文,提出PREDAF以當PRE問題。PREDAF且得類同信息於全值分析(GVN),該以珈吉(Karthik Gargi)之法以營之。於PRE問題,導入資料存取函式(DAF)以經之,且衍其純量型式。當其為符號判讀之際,PREDAF遣DAF以當其運算,而得之以其理。惟PRE之發掘,以上浮移動(Hoist Code Motion)以應之。
PREDAF成之於LLVM 7。以LLVM測試案例檢驗PRE,以疑難雜症證實向量swizzle效應。PRE之測驗,得之以18.37%與7%之程式碼降低,比之於原本,以及New GVN;至於向量,而得之以49.52%與46.19%之程式碼降低,較之與原本,以及New GVN。實驗之結果,驗證PREDAF之有效性。
Modern applications tend to require enormous computations with constant hardware technology breakthrough. With increasing heavier calculation missions on computers, performance issues gains more and more importance. Many researches provide compile-time optimizations to reduce unnecessary instructions, but they sometimes may not work well, e.g., partial redundancy elimination (PRE). Main reason indicates the process of analysis information relay tends to be interrupted after transfer from one basic block to another one. The situation goes wrong during occurrence of vector instructions, which is caused by nature behavior of special vector swizzle operations.

In this thesis, We propose PREDAF to PRE problem. PREDAF runs under the foundation of global value numbering (GVN) to easily access the congruence information for each value. PREDAF adopts Karthik Gargi's GVN work for better accuracy. For PRE analysis, we introduce mathematical analysis of data access functions (DAFs) and deduce scalar version of DAFs. During symbolic evaluation, PREDAF applies DAFs in both forms to formalize engaged instructions and carries out PRE diagnoses which PREDAF utilizes to match PRE pattern. Once pattern matched, PREDAF performs hoist code motion to eliminate the redundancy.

PREDAF is implemented in LLVM 7. We test PRE case with LLVM test suite and vector swizzle effect with complicated examples. The experimental results indicate that PREDAF reduces code size of LLVM IR programs with -18.37% and -7% compared to original programs and New GVN results respectively for LLVM test suite as well as reduces that of IR programs with -49.52% and -46.19% compared to original GVN pass and New GVN pass respectively with selected 20 complicated vector swizzle programs. Such result proves the efficacy of PREDAF.
Contents
Abstract i
Contents iii
List of Figures v
List of Tables vi
1 Introduction 1
1.1 GVN and PRE 2
1.2 GVN and Vector 4
1.3 PREDAF 5
2 Related Work 6
2.1 GVN 7
2.2 DAF 8
2.3 PRE 9
2.4 PREDAF 10
3 PREDAF 11
3.1 GVM Insertion Points 12
3.2 Introduction of DAF 14
3.3 PRE Optimization 15
4 16
4.1 Array Version of DAF 17
4.2 Vector Version of DAF 19
4.3 Scalar Version of DAF 20
5 Design and Implementation 21
5.1 Data Structures, Algorithms, and Implementation 22
6 Experiments 23
6.1 Examples for Vector PRE 24
6.2 Verification to PRE 25
6.3 Verification to Vector Swizzle 27
7 Future Work and Conclusion 30
7.1 Future Work 30
7.2 Conclusion 31
Bibliography 32
[1] Y. LeCun, Y. Bengio, and G. Hinton, "Deep learning," Nature, vol. 521, no. 7553, pp. 436-444, 2015.
[2] G. Gaspari and S. E. Cohn, "Construction of correlation functions in two and three dimensions," Quarterly Journal of the Royal Meteorological Society, vol. 125, no. 554, pp. 723-757, 1999.
[3] A. Papoulis, "Probability, Random Variables, and Stochastic Processes." McGraw-Hill, 1965.
[4] G. K. Wallace, "The jpeg still picture compression standard," Communications of The ACM, vol. 34, no. 4, pp. 30-44, 1991.
[5] C. Click, "Global code motion/global value numbering," in Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation, vol. 30, no. 6, 1995, pp. 246257.
[6] B. Alpern, M. N. Wegman, and F. K. Zadeck, "Detecting equality of
variables in programs," in Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, 1988, pp. 1-11.
[7] G. H. Hwang, J. K. Lee, and R. D. C. Ju, "A function-composition
approach to synthesize fortran 90 array operations," Journal of Parallel and Distributed Computing, vol. 54, no. 1, pp. 1-47, 1998.
[8] Y.-T. Lin and J. K. Lee, "Vector data flow analysis for simd optimizations on opencl programs," Concurrency and Computation: Practice and Experience, vol. 28, no. 5, pp. 1629-1654, 2016.
[9] L.-A. Her and J.-K. Lee, "Opencl vector swizzling optimization under global value numbering," 20th Workshop on Compilers for Parallel
Computing, 2018.
[10] K.-H. Drechsler and M. P. Stadel, "A solution to a problem with
morel and renvoise's global optimization by suppression of partial redundancies," ACM Transactions on Programming Languages and Systems,
vol. 10, no. 4, pp. 635-640, 1988.
[11] E. Morel and C. Renvoise, "Global optimization by suppression of partial redundancies," Communications of The ACM, vol. 22, no. 2, pp. 96-103, 1979.
[12] P. Briggs and K. D. Cooper, "Effective partial redundancy elimination," in Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, vol. 29, no. 6, 1994, pp. 159-170.
[13] L.-A. Her and H.-K. Lee, "Splendid gvn: Partial redundancy elimination for algebraic simplification," 2019 European LLVM developers' meeting, 2019.
[14] K. Gargi, "A sparse algorithm for predicated global value numbering," in Proceedings of the ACM SIGPLAN 2002 conference on Programming language design and implementation, vol. 37, no. 5, 2002, pp. 45-56.
[15] P. Abrahams and M. Schaefer, "A mathematical theory of global program optimization," Mathematics of Computation, vol. 29, no. 132, p.
1158, 1975.
[16] B. K. Rosen, M. N. Wegman, and F. K. Zadeck, "Global value
numbers and redundant computations," in Proceedings of the 15th
ACM SIGPLAN-SIGACT symposium on Principles of programming
languages, 1988, pp. 12-27.
[17] J. Cocke, Programming languages and their compilers: Preliminary
notes. Courant Institute of Mathematical Sciences, 1969.
[18] K. Cooper and T. Simpson, "Scc-based value numbering," Software
Practice and Experience, 1995.
[19] R. E. Tarjan, "Depth-first search and linear graph algorithms," SIAM Journal on Computing, vol. 1, no. 2, pp. 146-160, 1972.
[20] F. C. Chow, S. Chan, R. Kennedy, S.-M. Liu, R. Lo, and P. Tu, "A
new algorithm for partial redundancy elimination based on ssa form,"
in Proceedings of the ACM SIGPLAN 1997 conference on Programming
language design and implementation, vol. 32, no. 5, 1997, pp. 273-286.
[21] R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck, "Efficiently computing static single assignment form and the control dependence graph," ACM Transactions on Programming Languages and Systems, vol. 13, no. 4, pp. 451-490, 1991.
[22] R. Lo, F. Chow, R. Kennedy, S.-M. Liu, and P. Tu, "Register promotion by sparse partial redundancy elimination of loads and stores," in Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, vol. 33, no. 5, 1998, pp. 26-37.
[23] E. W. Dijkstra, Notes on structural programming th-report 70-wsk-03. Mathematics Technological University Eindhoven, 1970.
[24] R. C. Martin, Clean architecture : a craftsman's guide to software structure and design. Prentice Hall, 2018.
[25] E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns:
Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.
(此全文未開放授權)
電子全文
中英文摘要
 
 
 
 
第一頁 上一頁 下一頁 最後一頁 top
* *