English  |  正體中文  |  简体中文  |  全文筆數/總筆數 : 80990/80990 (100%)
造訪人次 : 41635266      線上人數 : 1362
RC Version 7.0 © Powered By DSPACE, MIT. Enhanced by NTU Library IR team.
搜尋範圍 查詢小技巧:
  • 您可在西文檢索詞彙前後加上"雙引號",以獲取較精準的檢索結果
  • 若欲以作者姓名搜尋,建議至進階搜尋限定作者欄位,可獲得較完整資料
  • 進階搜尋


    請使用永久網址來引用或連結此文件: http://ir.lib.ncu.edu.tw/handle/987654321/89724


    題名: 解決指令下沉阻擋商餘合併之最佳化演算法改良;An Algorithm to Prevent Division-Modulo Combine from Being Blocked by Instruction Sink
    作者: 林庭葦;Lin, Ting-Wei
    貢獻者: 資訊工程學系
    關鍵詞: 編譯器;程式碼最佳化;相序問題;程式碼移動;LLVM;機器相依最佳化;機器不相依最佳化;compiler;code optimization;phase-ordering;code motion;LLVM;machine-dependent optimization;machine-independent optimization
    日期: 2022-07-02
    上傳時間: 2022-10-04 11:57:25 (UTC+8)
    出版者: 國立中央大學
    摘要: 編譯器除了將程式碼由高階語言轉換成組合語言或者是機器語言外,還會根據不同的目的對程式碼進行最佳化以提升程式碼的品質。然而,由於最佳化的演算法很多,使得最佳化的順序會影響程式碼品質,有時甚至會使程式碼品質更差,如指令下沉使得取餘數、取商數分開到不同基本程式塊,導致商餘合併無法套用,這樣的阻擋問題會使程式碼的效能變差。由於指令下沉為機器不相依的最佳化,商於合併則為機器相依的最佳化,應用於後端,因此兩者難以對調其順序以避開該衝突。我們提出一個演算法,以解決該阻擋問題。我們將該演算法介入並實作於 LLVM 最佳化器上的指令下沉內,以求解決所有會受影響的後端。最後根據可行性、相容性、針對性三個面向進行完整的評估,評估結果表示確實能夠有效的解決該阻擋問題且不會與其他最佳化演算法產生衝突而最佳化失敗,也能夠只針對有問題的指令進行處理而不會影響到正常的其他指令。;Compiler compiles high-level language like C language to assembly language even machine code to let programmers don′t need to concern about what machine actually do and how to write machine code while developing. In addition, it can optimize the code base on different purpose. However, according to compiler phase-ordering problem, the orders of optimizations will impact the quality of programs. In some cases, the sequence of optimizations will make the program worse. For example, Instruction Sink separates division and modulo to different basic blocks and this act will make Division-Modulo Combine failed to be applied. Because the former is a machine-independent optimization and the latter is a machine-dependent optimization, it′s hard to reorder them to avoid the problem. We propose an algorithm to solve this blocking issue. We implement our algorithm in Instruction Sink in LLVM Optimizer to keep this problem from all impacted backend. In the end, we evaluate the feasibility, the compatibility and the pertinence. The result shows that our proposal can solve this problem and won′t conflict with other optimizations to let program worse. It also shows that our algorithm only targets the instruction with blocking issue and won′t change the other normal instructions.
    顯示於類別:[資訊工程研究所] 博碩士論文

    文件中的檔案:

    檔案 描述 大小格式瀏覽次數
    index.html0KbHTML23檢視/開啟


    在NCUIR中所有的資料項目都受到原著作權保護.

    社群 sharing

    ::: Copyright National Central University. | 國立中央大學圖書館版權所有 | 收藏本站 | 設為首頁 | 最佳瀏覽畫面: 1024*768 | 建站日期:8-24-2009 :::
    DSpace Software Copyright © 2002-2004  MIT &  Hewlett-Packard  /   Enhanced by   NTU Library IR team Copyright ©   - 隱私權政策聲明