簡易檢索 / 詳目顯示

研究生: 詹竣傑
Jun-Jie Zhan
論文名稱: LLVM TDBlock:針對LLVM 後端平台描述之圖型化介面
LLVM TDBlock : GUI Programming Tool for LLVM Target Description
指導教授: 黃元欣
Yuan-Shin Hwang
口試委員: 謝仁偉
Jen-Wei Hsieh
賴祐吉
Yu-Chi Lai
學位類別: 碩士
Master
系所名稱: 電資學院 - 資訊工程系
Department of Computer Science and Information Engineering
論文出版年: 2017
畢業學年度: 106
語文別: 中文
論文頁數: 46
中文關鍵詞: 編譯器LLVMRISC-VOpenBlocks
外文關鍵詞: Compiler, LLVM, RISC-V, OpenBlocks
相關次數: 點閱:326下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

隨著技術的進步,在原有的指令集架構(ISA,instruction set architecture)下,各個目標處理器的架構皆有更新、或者新增擴展指令集。也有如RISC-V,基於原有的RISC原則開發出的開源指令集架構。而不管是開發新的架構或者對於嵌入式系統的編譯器後端移植,目前大多會以 LLVM來處理。所以對於使用LLVM開發編譯器後端的效率與通用性是個值得探討的議題。
本論文提出利用OpenBlocks為基礎的圖形介面工具,進而將LLVM後端開發架構中TableGen所描述的目標暫存器與目標指令集文件檔 .td(target description),製作成可視覺化的介面;其機制是拉取程式塊,以圖形化的方式來描述目標暫存器與目標指令集。因在各個目標架構中進行描述暫存器與指令集皆是使用TableGen的語法與結構,故經過本論文整理過的圖形化介面後可以快速的開發與移植相似的架構。
最後本論文以此圖形介面工具實作RISC-V架構,描述其暫存器與指令資訊;並進行各種實測來保證正確性。


With new technological advances, every instruction set architectures provide the update, such as RISC-V, which is an open instruction set architecture based on established RISC principles. LLVM can be used on new architecture development and compiler backend porting implement. How to implement LLVM backend fast is an important issue.
We use OpenBlocks, a GUI programming tool, to design LLVM TDBlock which can implement target description files in LLVM backend. Instead of writing code, we can design a graphical user interface to generate target description by just “drag-and-drop”. It provides clear block to design target description, and improves developer work efficiency.
LLVM TDBlock support on RISC-V architecture now. Moreover, we do lots of experiments to ensure the accuracy.

摘要 III Abstract III 致謝 IV 目錄 V 圖目錄 VII 表目錄 VIII 第一章 序論 1 1.1研究背景 1 1.2研究動機 1 1.3研究目的 2 1.4研究方法 2 1.5論文架構 3 第二章 文獻回顧 4 2.1 LLVM 4 2.2 LLVM Backend 6 2.2.1 LLVM後端流程 6 2.2.2 TableGen 7 2.3 OpenBlocks 10 2.4 RISC-V 13 第三章 方法 14 3.1 概念 14 3.2 Target Description的Block實作 15 3.2.1 RegisterInfo Block 16 3.2.2 InstrFormats Block 21 3.2.3 InstrInfo Block 24 3.2.4 CallingConv Block 27 第四章 實驗結果 31 4.1 實驗環境 31 4.2 數據比對 31 4.3 執行測試 32 第五章 結論與未來展望 34 5.1 結論 34 5.2 未來展望 34 參考文獻 35

[1] TableGen - LLVM 6 documentation. http://llvm.org/docs/TableGen/ .

[2] Eric Klopfer, Daniel Wendel, Ricarose Roque, Corey McCaffrey, Lunduo Ye, Aidan Ho, Brett Warne, Xudan Liu, Hout Nga, “MIT OpenBlocks,” https://github.com/mikaelhg/openblocks.

[3] A. Waterman, “Design of the RISC-V Instruction Set Architecture,” Technical Report No. UCB/EECS-2016-1, EECS Department, University of California, Berkeley, January 2016.

[4] SPEC: Standard Performance Evaluation Corporation. http://www.spec.org, September 2000.

[5] C. Lattner and V. Adve, “LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation,” in Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, ser. CGO ’04.Washington, DC,USA: IEEE Computer Society, 2004, pp. 75.

[6] StarLogo TNG. http://education.mit.edu/portfolio_page/starlogo-tng/.

[7] David Li, He Qichen, “ArduBlock,” https://github.com/taweili/ardublock, 2011.

[8] D. Kanter, “ RISC-V Offers Simple, Modular ISA,” The Linley Group MICROPROCESSOR report, March 2016.

[9] Andrew Waterman, Yunsup Lee, David Patterson, Krste Asanovic, “The RISC-V Instruction Set Manual, Volume I: User-Level ISA Version 2.0,” Technical Report UCB/EECS-2014-52, EECS Department, University of California, Berkeley, May 2014.

[10] Y. Lee, A. Waterman, H. Cook, B. Zimmer, B. Keller, A. Puggelli, J. Kwak, J. Bachrach, D. Patterson, E. Alon, B. Nikolic, K. Asanovic, “An Agile Approach to Building RISC-V Microprocessors,” IEEE Micro, March 2016.

[11] TableGen Language Reference. http://llvm.org/docs/TableGen/LangRef.html.

[12] Writing an LLVM Backend. http://llvm.org/docs/WritingAnLLVMBackend.html#instruction-operand-name-mapping.

[13] Chen Chung-Shu, “Tutorial: Creating an LLVM Backend for the Cpu0 Architecture,” Nov 03, 2016.

[14] Fraser Cormack, Pierre-Andre Saulais, Building an LLVM Backend. Apr, 2014.

[15] riscv-llvm. https://github.com/riscv/riscv-llvm.

[16] Mayur Pandey, Suyog Sarda, LLVM Cookbook, May, 2015.

[17] 任勝兵, 盧念, 張萬利, 潘震宇. 基於LLVM架構的Nios II後端快速移植. Computer Applications and Software, Vol. 28 No. 12, Dec. 2011.

[18] Jozef Kolek, Zoran Jovanović, Nenad Šljivić, Dragan Narančić, “Adding microMIPS Backend to the LLVM Compiler Infrastructure,” IEEE, 2013.

[19] Fraser Cormack, Pierre-André Saulais, Building an LLVM Backend, European LLVM Conference, 2014.

無法下載圖示 全文公開日期 2022/10/16 (校內網路)
全文公開日期 本全文未授權公開 (校外網路)
全文公開日期 本全文未授權公開 (國家圖書館:臺灣博碩士論文系統)
QR CODE