A Vectorization Approach for Irregular Memory Access on Sunway Processors

Lin Han, Lei Li, Haoran Li, Mengyao Chen, Kai Nie, Haohao Liu · 2025

Irregular memory access codes are widely present in scientific computing programs. Due to the discontinuity of memory addresses and the complexity of data references, the current SWGCC compiler on the Sunway platform has not yet achieved vectorization transformations for complex irregular memory access patterns. To address the difficulty of vectorizing complex irregular memory accesses in the SWGCC compiler, this paper proposes a SIMD instruction generation method. We design intrinsic functions based on the vector instruction set of the Sunway platform to implement gather/scatter functionality for handling discontinuous data. Experimental results show that the proposed method can vectorize multiple irregular memory access pattern test cases, effectively enhancing the vectorization capability of the SWGCC compiler, thereby improving the execution efficiency of irregular applications on the Sunway platform.

Read the paper · More papers on PaperTik