Research of SIMD Vectorization Algorithm and Regrouping Technology
- Author
- WeiShuai
- Advisor
- ZhaoRongCai
- School
- PLA Information Engineering University
- Major
- Computer Software and Theory
- Classification
- TP314 Compiler,interpreter
- Degree
- Doctoral dissertation
- Year
- 2012
- Downloads
- 28
- Citations
- 1
Abstract
With the popularity of multimedia applications, more and more processors have beenintegrated with SIMD extensions. As the support for float computation in SIMD extensionsbecome more sophisticated, SIMD extensions are more widely used in high computation field.Different SIMD extensions support various instruction sets, which are close to hardware. So it isdifficult for programmer to write SIMD code by hand, the work has to be realized automatically.Most of the compilers have applied automatic vectorization, such as Gcc, Open64and Icc.Currently there are two mainstream vectorization approaches: traditional vectorization focuson exploiting inter-iteration parallelism, SLP focus on exploiting inner-iteration parallelism.There are both advantages and disadvantages for the two vectorization approaches. Only whenthe advantages of two vectoriation approaches combined, then can loops be vectorized better.Besides, the unaligned/discrete memory access and loops with short dependence distance alsoincur great challenges for vectorization, and there have been no efficient vectorizationapproaches for nested loops. Furthmore, for specific SIMD extensions special vectorizationapproaches and code generation methods are required.This dissertation take CPU SW1600as main platform, bring modified SLP algorithmRLRSLP and ISGSLP based on specific characteristics of SIMD extensions. In order toovercome the disadvantages of vectorization for basic block, add some associate optimizationsfor SLP. An aggressive vectorization scheme is brought out based on the main factors whichinfluence vectorizing loop nest. Permutaion algorithms for SW1600are presented based on thespecific permutation instructions for SW1600.The main contributions are listed as below.1. SLP algorithm is not as efficient as conventional vectorization algorithm when dealingwith some loops due to load redundant elimination. To solve that problem bringforward RLRSLP algorithm based on SLP algorithm which reserve redundant loadstatements. In order to solve the selection problem brought by reserving redundantloads, adopts packing method on the basis of dependence analysis which extendpackset following use-def chains preferentially. Make sure the pack generationaccording to dependence relationship, so there is no need to schedule packs.Furthermore, most SIMD extensions provide perfect vector permutation instructions, sothis dissertation brings out ISGSLP which add isomorphic generation stage to vectorizethe loops with discrete memory accesses.2. Discrete or unaligned memory accesses incur vectorization performance degrade, andSLP can’t vectorize loop perfectly for some special loops such as reduction and loopswith short dependence distance. This dissertation brings out the a mathematic model todescribe array reference and array regroup, in order to do intra-procedural data regroupto avoid incongruous memory reference, it also adopts inter-procedural array padding,loop peeling and optimized code generation to avoid misalignment. As for reduction and loops with short dependence distance, do redundant store elimination and reductiontransform before SLP, and vector operation combination and redundant eliminationafter SLP, as to vectorize loop perfectly.3. The vectorization usually target for innermost loop, there have been no easyvectorization approaches dealing with loop nest. This dissertation brings out anautomatic vectorization approach to vectorize nested loops form outer to inner, firstanalyzes whether the loop can do direct unroll-and-jam through dependency analysis;then collect the values about the loop that will influence vectorization performance,mainly including whether it can do direct unroll-and-jam, the number of arrayreferences that are continuous for this loop index, and the loop region; presents anaggressive algorithm to decide which loops need to do unroll-and-jam, at last generateSIMD code using ISGSLP algorithm.4. Because there exist various vector regroup instructions and the costs of theseinstructions are not equal, it is hard to find an efficient algorithm to realize vectorpermutation. This dissertation analyzes the characteristics of the vector permutationinstructions—shift and insert/extract instructions for SW-1600, designs two algorithmswhich can permutate vectors using least shift or insert/extract instructions, and presentan efficient regroup algorithm using these two types of instructions.
Table of contents
List of Tables 7-8
LIST 8-11
Summary 11-13
ABSTRACT 13-15
the first chapter 15-37
1.1 research background 15-18
1.1.1 vector Machine and SIMD extensions 15-17
1.1 .2 for automatic SIMD vectorization 17-18
1.2 to the main method to quantify 18-27
1.2.1 traditional methods to quantify 18-21
1.2.2 ultra- word parallel (SLP) 21-25
1.2.3 other methods to quantify 25-27
1.3 to quantify the challenges facing 27-29
1.3.1 nbsp vectorization method ; 27
1.3.2 and related data layout optimization 27-28
1.3.3 recombinant vector 28-29
1.4 Open64 its intermediate representation 29-32
1.5 research content 32-34
1.5.1 research content 32-33
1.5.2 research significance 33-34
1.5.3 research platform organizational structure 34
1.6 papers 34-37
chapter improved SLP algorithm RLRSLP and ISGSLP 37-61
2.1 motivation 37-40
2.2 related research Implementation Framework 40
2.3 RLRSLP and ISGSLP algorithm 40-55
2.3.1 addresses of three thoroughly and scalar renaming 41-43
2.3.2 build dependency graph 43-45
2.3.3 dependency relations under the guidance of UD expansion pack to generate priority 45-49
2.3.4 overall benefit analysis 49 -51
2.3.5 delete redundant load pack and addresses of three recovery 51
2.3.6 nbsp vectorized code generation and optimization ; 51-55
2.4 experimental results and analysis 55-60
2.4.1 RLRSLP algorithm performance test 55-57
2.4.2 ISGSLP algorithm performance test 57-60 <br / > 2.5 Summary 60-61
the third chapter based SLP auxiliary optimization 61-91
3.1 motivation 61-65
3.2 related Research 65-67
3.3 pre-optimized within 67-75
3.3.1 process array transpose between 67-69
3.3.2 process array filled 69-70
3.3.3 aligned to optimize 70-73
3.3.4 abatement statement carried by the store relies 73-75
3.3 .5 be Statute transform 75
3.4 SLP to assist quantified after optimization 75-80
3.4.1 performs vector operations merged 76
3.4 .2 vectorized loop invariant code outside mention 76-77
3.4.3 eliminate redundant vector assignment 77-79
3.4.4 register reuse optimization 79-80
3.5 experimental results and analysis 80-88
3.5.1 for short- distance cycle -dependent performance tests to quantify 80-81
3.5. 2 for data reorganization and alignment analysis performance testing 81-82
3.5.3 nbsp performance testing against other optimization ; 82-88
3.6 Summary 88-91
Chapter IV -oriented multi- cycle SIMD vectorization 91-107
4.1 motivation 91-93
4.2 related research 93-94
4.3 vectorization algorithm for multiple cycles and achieve 94-102
4.3.1 compiler framework 94-95
4.3.2 candidate loop identification 95
4.3.3 SLP -based multi- loop vectorization 95-99
4.3.4 decision loop transformation program 99-100
4.3.5 conducted by ISGSLP vector explore and code generation 100-102
4.4 experimental results and analysis 102-105
4.5 Summary 105-107
Chapter V for SW1600 the recombinant vector 107-119
5.1 motivation and research status 107-109
5.2 goals recombinant vector system command 109-110
5.3 implementation vector recombination 110-114
5.3.1 using recombinant vector shift achieve 110-111
5.3.2 insertion of recombinant vectors extracted achieve 111 -112
5.3.3 comprehensive shift and insertion of recombinant vectors extracted achieve 112-114
5.4 results and analysis 114-116
5.5 Summary 116-119
Conclusion 119-122
References major work 122-129
Author Biography pursuing a doctorate completed during 129-130
Thanks 130
Related dissertations
- The Design and Implementation of Vector Memory Unit of Multi-Width SIMD DSP
- The Design and Implementation of High-performance fixed-point Arithmetic Unit for SIMD DSP
- Design and Implemtation of BP Component and Shuffle Unit in YHFT-Matrix Processor
- Research on Benefit Evaluation Techniques in Automatic Vectorization
- Research on DSP Automatic Vectorization and Optimization
- Research on Profile-Guided SIMD Vectorization Identification and Optimization
- Design of Multi-core Parallel Computing System for Backprojection Imaging
- Research of SIMD Vectorization Optimization Based on Memory Access
- Design and Optimization of Hash Algorithms Based on Multi-core CPUs
- Research and Design of Floatins-Point Accelerator
- The Implementation and Optimization for Lte Pusch Receiver Based on the General Purpose Processor
- Research and Implementation on Channel Estimation Algorithms in LTE Based on General Purposed Processor
- Gpp-Based Design and Implementation of LTE Dwonlink Receiver Parallel Strategy and Mimo Detection
- Avs Several Main Module Implementation and Optimization
- Implementation and Optimization of AVS Interframe Decoding Algorithm
- Optimization of Video Encoding Based on MMX
- Mimo Detecting Research and Implementation Based on General Purpose Processor
- Optimization of VC-1Decoder on ARM Cortex-A8
- Research on Prediction Method of AVS
- Spatial Scalable AVS Video Coding Based on Decoder