簡易檢索 / 詳目顯示

研究生: 劉記漢
Ji-Han Liou
論文名稱: 建立LLVM後端多平台目標描述檔的圖形化介面工具
GUI Tool to Build LLVM Target Description Files for Multiple Platforms
指導教授: 黃元欣
Yuan-Shin Hwang
口試委員: 黃元欣
Yuan-Shin Hwang
戴文凱
Wen-Kai Tai
謝仁偉
Jen-Wei Hsieh
學位類別: 碩士
Master
系所名稱: 電資學院 - 資訊工程系
Department of Computer Science and Information Engineering
論文出版年: 2021
畢業學年度: 109
語文別: 中文
論文頁數: 50
中文關鍵詞: 編譯器
外文關鍵詞: Compiler, LLVM, RISC-V, OpenBlocks, MIPS
相關次數: 點閱:182下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著科技的發展與進步,越來越多的新指令集架構(ISA,instruction set architecture)被提出。例如RISC-V。在不同的架構中即使有相同名稱的格式、指令、暫存器其背後的定義有可能是截然不同的,因此要開發或移植到新的指令集架構必須要重新再花一次時間去瞭解新的架構。
    LLVM Project是一個開源專案,它是可模組化可重用編譯器與工具鏈技術的集合,LLVM Project因其模組化可重用越來越受歡迎,如何更加快速的開發或移植LLVM後端是一個重要的議題。
    本篇論文採用OpenBlocks為基礎的圖形介面工具,我們的圖形化介面工具是LLVM TDBlock,它可以產生LLVM後端開發中不同架構皆所需要的target description file,使用LLVM TDBlock只需拉出單一程式區塊或是將指令進行配對即可產生所需的目標描述檔內容以減少開發者的開發時間。
    本篇論文主旨在於研究各種不同的架構以及如何撰寫出不同架構的target description files,讓我們的圖形化介面工具LLVM TDBlock可以幫助使用者建立多平台的target description files,本篇論文以實作RISC-V的整數指令集與MIPS的整數指令集在LLVM TDBlock上並且作為範例,展示我們的工具在移植新架構上的便利性,並且進行各種實測來保證正確性。


    With advances in science and technology, more and more new architectures are proposed, such as RISC-V. In different architectures, the definition of registers , formats and instructions is totally different even if they have the same name. Therefore, developers spend a lot of time again to know new architectures for development or porting.
    LLVM is a open source project and it’s modular and reusable. This is the reason that it’s getting popular. How to implement LLVM backend fast is an important issue.
    LLVM TDBlock is based on OpenBlocks, Our tool can generate target description files for multiple platforms. Users only need to drag a block to workspace or drag one block from target and the other one from LLVMIR to be a pattern. Our tool can help developers reduce time of development.
    Main ideas of this thesis are researching different architectures and how to generate target description files for multiple platforms. we implement integer instruction set of RISC-V and MIPS as instances in LLVM TDBlock. These two instances demonstrate convenience of porting to another platform by using LLVM TDBlock. Moreover, we do a lot of experiments to ensure the correctness.

    目錄 摘要 I Abstract III 致謝 IV 目錄 V 圖目錄 VIII 第一章簡介 1 1.1研究背景 1 1.2研究動機 1 1.3研究目的 2 1.4研究方法 2 1.5論文架構 3 第二章相關研究與背景知識 5 2.1 LLVM 6 2.2 LLVM Backend 7 2.2.1 LLVM後端流程 8 2.2.2 TableGen 9 2.3 RISC-V與MIPS 13 2.3.1 RISC-V與MIPS的指令格式 14 2.3.2 RISC-V與MIPS的指令 16 2.3.3 RISC-V與MIPS的暫存器 17 2.3.4 RISC-V與MIPS的呼叫慣例 20 2.4 OpenBlocks 21 第三章實作方法 22 3.1圖形化介面工具LLVM TDBlock的概念 22 3.2 圖形化介面工具LLVM TDBlock的實作 24 3.2.1 RegisterInfo 24 3.2.2 InstrFormats 27 3.2.3 LLVMIRToRISCVI 30 3.2.4 LLVMIRToMIPSI 31 3.2.5 CallingConv 33 第四章實驗結果 35 4.1實驗環境 35 4.2驗證結果 35 4.3實驗數據 36 第五章總結與未來發展 38 5.1總結 38 5.2未來發展 38 參考文獻 39

    [1] Jozef Kolek, Zoran Jovanović, Nenad Šljivić, Dragan Narančić, “Adding microMIPS Backend to the LLVM Compiler Infrastructure” in Telecommunications Forum, 2013

    [2] Jun-Jie Zhan, LLVM TDBlock : GUI Programming Tool for LLVM Target Description, Oct. 13, 2017

    [3] Sheng-Jie Chen, GUI Tool to Support LLVM Target Description for RISC-V Extension Instruction Set, 2019

    [4] Jia-Cheng Yang, A graphical Programming Tool for RISC-V Extension Instruction Set, 2019

    [5] TableGen https://llvm.org/docs/TableGen/

    [6] Andrew Waterman1, Krste Asanovi´c. The RISC-V Instruction Set Manual Volume I: Unprivileged ISA Document Version 20180801-draft https://inst.eecs.berkeley.edu/~cs152/sp19/handouts/sp19/riscv-spec-rvv-v0p4.pdf

    [7] MIPS® Architecture for Programmers Volume II-A: The MIPS32® Instruction Set Manual Document Number: MD00086 Revision 6.06 December 15, 2016 https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00086-2B-MIPS32BIS-AFP-6.06.pdf

    [8] 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

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

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

    [11] CPU SPEC2017 https://www.spec.org/cpu2017/

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