GCC built-in function mechanism analysis and LoongArch-based implementation

Xiaolong Chen, Yagang Wang, Lulu Cai · 2022 41st Chinese Control Conference (CCC) · 2022

The GUN Compiler Collection (GCC) provides thousands of built-in functions to implement functions missing in C and to provide target-related performance optimizations. Firstly, the built-in functions in GCC are introduced. Secondly, the implementation mechanism of built-in functions in the compiler is analyzed in depth using static and dynamic analysis of GCC source code. Finally, some typical common floating-point built-in functions are implemented on the LoongArch 3C5000 platform. The experimental results show that the average performance of the floating-point built-in functions implemented inside the compiler is improved by 21% to 170% compared to the traditional glibc function calls and can take full advantage of the performance of the LoongArch64 machine.

Read the paper · More papers on PaperTik