Jisuanji kexue (Nov 2022)

Optimization Method of Streaming Storage Based on GCC Compiler

  • GAO Xiu-wu, HUANG Liang-ming, JIANG Jun

DOI
https://doi.org/10.11896/jsjkx.211200252
Journal volume & issue
Vol. 49, no. 11
pp. 76 – 82

Abstract

Read online

To solve the problem of cache pollution and mandatory loss caused by streaming memory access,some high-perfor-mance general-purpose processor platforms provide a dedicated path and supporting instructions for accessing memory directly without accessing the cache.The overall performance of chip memory system can be improved by using direct memory access in common application scenarios such as streaming storage.However,it is a tedious and error-prone task for programmers to determine when direct access to main memory is beneficial,and an effective way is to implement it automatically through the compiler.Therefore,based on the in-depth analysis of the benefits of different types of access operations under the streaming storage access mode,this paper proposes a streaming storage optimization method based on GCC compiler.In the SSA-GIMPLE stage of GCC compiler,the continuous write or step write with stream access characteristics in the program loop is recognized,and optimization objects are screened according to the benefit analysis and dependency relationship.Finally,the direct access main memory instructions are generated by matching instruction templates at the back end of compiler.The continuous/step-write case and STREAM test set and their variants are used for experimental evaluation on SW domestic processor platform.The results show that the optimized method can significantly reduce the execution time of STREAM storage applications,and the average acceleration ratio of STREAM test set after optimization is 1.31.Additionally,in conjunction with loop unwinding optimization,the STREAM test set has an average acceleration ratio of 1.45.

Keywords