Title: | 在LLVM上的超級字組自動向量化 An Automatic Superword Vectorization in LLVM |
Authors: | 陳冠旭 Chen, Kuan-Hsu 楊武 Yang, Wuu 資訊科學與工程研究所 |
Keywords: | 自動向量化;auto-vectorization;UltraSPARC T2;SPARC;VIS Instruction Set |
Issue Date: | 2009 |
Abstract: | 為了增加效能,近代越來越多處理器支援單一指令多重資料(SIMD)架構。而程式設計員為了使用這些指令通常必須具有此處理器的背景知識,所以透過編譯器自動產生這些指令是必要的。本文開發一個自動產生SIMD指令的最佳化 (Superword vectorization)在LLVM(Low Level Virtual Machine)編輯器架構上。此最佳化包含自動向量化和對齊分析兩部分,自動向量化找出程式內可向量化部分並做轉換。而
對齊分析分析每個記憶體存取位址是否在記憶體邊界。因此程式碼產生器(code generator)利用此資訊來產生特定處理器的特殊指令來解決不連續記憶體位址存取(misaligned access)。在這篇論文的實驗機器為UltraSPARC,我們利用兩個指令來達到不連續的記憶體位址存取。而經由實驗結果,程式效率可以得到4%~35%的提升。 More and more modern processors support SIMD instructions for improving performance in media applications. Programmers usually need detailed target-specific knowledge to use SIMD instructions directly. Thus, an auto-vectorization compiler that automatically generates efficient SIMD instructions is in urgent need. We implement an automatic superword vectorization, based on the LLVM compiler infrastructure, to which an auto-vectorization and an alignment analysis passes have been added. The auto-vectorization pass exploits data-parallelism in a basic block and convert IR instructions from primitive type to vector type. Then, in code generator, the alignment analysis pass analyzes every memory access with respect to those vector instructions and generates the alignment information for generate target-specific alignment instructions. In this paper, we use UltraSPARC as our experimental platform and use two realignment instructions to perform misaligned access. We also present preliminary experimental results, which reveals that our optimization generates vectorized code that are 4% up to 35% speed up. |
URI: | http://140.113.39.130/cdrfb3/record/nctu/#GT079655573 http://hdl.handle.net/11536/43377 |
Appears in Collections: | Thesis |