Responsive image
博碩士論文 etd-0902110-174242 詳細資訊
Title page for etd-0902110-174242
論文名稱
Title
支援OpenGL ES 2.0程式中向量運算之編譯器
Compiler Support for Vector Processing on OpenGL ES 2.0 Programs
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
45
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2010-06-29
繳交日期
Date of Submission
2010-09-02
關鍵字
Keywords
向量運算、編譯器
Vector Processing, LLVM, Compiler, OpenGL Shading Language
統計
Statistics
本論文已被瀏覽 5669 次,被下載 13
The thesis/dissertation has been browsed 5669 times, has been downloaded 13 times.
中文摘要
本篇論文展示一個OpenGL ES 2.0程式編譯器的開發,該編譯器產生新穎圖形處理器的指令。此論文是一個大型計畫的一部分,該計畫目的為開發嵌入式系統低功率圖形處理器。
我們的編譯器開發使用LLVM為基礎並著重三個編譯器領域進行討論:(1)修正並增進編譯器前端 (front-end, shading language parser) 效率。(2)新增LLVM bitcode格式以支援shading language的資訊。(3)修改LLVM編譯器後端以支援新增的bitcode。主要的工作是支援OpenGL的GLSL shading language中的矩陣和向量資料型態。
  結合本文中提及的其他論文後,將完成一個針對我們新型圖形處理器的可運行、基礎GLSL編譯器。在未來的研究,將探討如何使該編譯器最佳化和健全。
Abstract
This thesis describes the development of a compiler for OpenGLES 2.0 programs for a novel GPU. This work is a part of a larger project to develop a low-power GPU for embedded systems.
Our compiler has been developed in the LLVM compiler infrastructure. The present thesis focuses on three areas of the compiler: 1) making corrections and improvements to an existing graphics shading language parser, 2) augmenting LLVM’s bit-code format to support the new information from the shading language, and 3) modifying LLVM’s backend to support this augmented bit-code. Much of this work is related to supporting the matrix and vector primitive data types found in OpenGL’s GLSL shading language.
In conjunction with several other theses, as listed in the text, this work achieves a working basic compiler for GLSL code on our new GPU. Continuing work by future researchers is necessary to make the compiler more robust and optimized.
目次 Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2. Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1 OpenGL ES Shading Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Our Novel GPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 The LLVM Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.1 The LLVM Front-end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.2 The Augmented LLVM IR Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.3 The LLVM Back-end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3. Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1 Co-developed Aspects of the Compiler . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 Related Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4. Compiler Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.1 Correcting the Imperfections of the GLSL Parser [5] . . . . . . . . . . . . . . 19
4.2 The LLVM Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3 Modifications to the Back-end for Vectors . . . . . . . . . . . . . . . . . . . . . 23
4.3.1 Mapping the LLVM IR to Assembly Code . . . . . . . . . . . . . . . . . . . . 25
4.3.2 Combining the Scalar and Vector Register Sets . . . . . . . . . . . . . . . . . 27
5. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6. Conclusions and Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
參考文獻 References
[1] R. J. Rost, OpenGL Shading Language, Second Edition. Reading, MA, USA: Addison-Wesley, 2006.

[2] Aaftab Munshi and Jon Leech, “OpenGL ES Common Profile Specification Version
2.0.24”. Website: http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.24.pdf

[3] Robert J. Simpson, “The OpenGL ES Shading Language, Language Version 1.00,
Document Revision 17”. Website: http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

[4] LLVM Language Reference Manual. Website: http://llvm.org/docs/LangRef.html

[5] G. F. Tseng and M. C. Chiang, “OpenGL ES 2.0 Shading Language to LLVM Compiler” Internal document, 2008. http://cooldavid.org/cooldavid.html

[6] LLVM Bitcode File Format. Website: http://llvm.org/docs/BitCodeFormat.html

[7] A. Aho, M. Lam, R. Sethi and J. Ullman, “Compilers: Principles, Techniques and Tools(2nd Ed)”, Pearson Addison Wesley, Hong Kong, 2006.

[8] K. C. Lu and S. Haga. “Compiler Development to Support OpenGL 2.0 ES on a Novel 3D Graphics Processor”, Master’s thesis, National Sun Yat-Sen University, Kaohsiung, Taiwan, August 2010.

[9] Sheng-Chih Tseng and S. Haga. “Compiler/Hardware Codesign and Memory Management for a Novel 3D Graphics Processor”, Master’s thesis, National Sun Yat-Sen University, Kaohsiung, Taiwan, August 2010.

[10] F. W. Tsai and C. L. Lee, “An Emulator for OpenGL ES 2.0 based on C-language Compiler.”Masters Thesis: National Sun Yat-Sen University, Kaohsiung, Taiwan, August 2008.

[11] J. Nickolls, I. Buck, M. Garland, and K. Skadron. “Scalable Parallel Programming with CUDA,” GPU Computing, Volume 6, Issue 2, March/April 2008, pp. 40-53.

[12] N. Rubin. “Issues and Challenges in Compiling for Graphics Processors,” Proc. of the 6th annual IEEE/ACM international symposium on Code generation and optimization, Boston, MA, April 8, 2008.

[13] R. Cabido, D. Concha, J. Pantrigo, and A. Montemayor. “High Speed Articulated Object Tracking Using GPUs: A Particle Filter Approach,” The 2009 International Workshop on GPU Technologies and Applications, Kaohsiung, Taiwan, December 2009.
[14] C. Lattner. “LLVM for OpenGL and other stuff.” LLVM Designers Conference, May 2007.

[15] W. Mark and K. Proudfoot. “Compiling to a VLIW Fragment Pipeline.” Proc. of SIGGRAPH/Eurographics Workshop on Graphics Hardware, Los Angeles California. July 2001.

[16] K. Diefendorff, P. Dubey, R. Hochsprung, and H. Scales. “Altivec Extension to PowerPC Accelerates Media Processing,” IEEE Micro. Vol. 20, No. 2, March-April 2000.

[17] N. Sreraman and R. Govindarajan. “A Vectorizing Compiler for Multimedia Extensions,” The International Journal of Parallel Programming. Vol. 28, No 4, 2000.

[18] LLVM Language Reference Manual: Constants. Website: http://llvm.org/docs/LangRef.html#constants

[19] Extensible Markup Language (XML) 1.0, Fifth Edition. Website: http://www.w3.org/TR/xml/

[20] LLVM's Analysis and Transform Passes. Website: http://llvm.org/docs/Passes.html
電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:校內公開,校外永不公開 restricted
開放時間 Available:
校內 Campus: 已公開 available
校外 Off-campus:永不公開 not available

您的 IP(校外) 位址是 3.138.141.202
論文開放下載的時間是 校外不公開

Your IP address is 3.138.141.202
This thesis will be available to you on Indicate off-campus access is not available.

紙本論文 Printed copies
紙本論文的公開資訊在102學年度以後相對較為完整。如果需要查詢101學年度以前的紙本論文公開資訊,請聯繫圖資處紙本論文服務櫃台。如有不便之處敬請見諒。
開放時間 available 已公開 available

QR Code