A Compiler Comparison in the RISC-V Ecosystem

A Compiler Comparison in the RISC-V Ecosystem
复制标题

DOI:
10.1109/coins49042.2020.9191411
复制
发表时间:
2020-08
期刊:
2020 International Conference on Omni-layer Intelligent Systems (COINS)
影响因子:
--
通讯作者:
Mehrdad Poorhosseini;W. Nebel;Kim Grüttner
Mehrdad Poorhosseini;W. Nebel;Kim Grüttner
中科院分区:
其他
文献类型:
--
作者:
Mehrdad Poorhosseini;W. Nebel;Kim Grüttner

文献摘要

被引文献

相似文献

GNU编译器集合(GCC)是大多数嵌入式系统的传统编译器,因为它在后端支持许多不同的指令集体系结构(ISA)。GCC也是第一个支持RISC-V ISA的编译器。一段时间以来,Clang/LLVM在嵌入式软件社区中获得了越来越多的兴趣。最近,LLVM后端也支持RISC-V,并在官方LLVM版本中进行了维护。在本文中,我们提出了一个基准环境,用于比较RISC-V生态系统中的编译器。考虑到编译时间、生成的二进制代码的大小、指令的数量和执行时间,我们在嵌入式软件基准测试中对GCC和LLVM进行了比较。结果表明,在88%的实验中,LLVM的编译速度较快,而在51%的实验中,GCC和LLVM产生的二进制大小几乎相同。GCC获胜的比例为37%,LLVM获胜的比例为12%。在94%的实验中,GCC得到的二进制大小与LLVM的二进制大小之间的差异为+/-5%。执行时间分析表明,在42%的实验中,GCC和LLVM的执行时间时钟周期基本相同,而在40%的实验中,GCC获胜,18%的实验中LLVM获胜。
The GNU Compiler Collection (GCC) is the traditional compiler for most embedded systems, since it supports many different instruction set architectures (ISA) in its back-end. GCC has also been the first compiler that supported the RISC-V ISA. Since a while Clang/LLVM has gained more and more interest in the embedded software community. Recently, RISC-V is also supported in the LLVM back-end and maintained in the official LLVM release. In this paper we propose a benchmark environment for the comparison of compilers in the RISC-V ecosystem. We perform a comparison of GCC against LLVM for an embedded software benchmark considering compile time, size of the resulting binary, number of instructions and execution time. The results show that LLVM compiles faster in 88% of the experiments, while GCC and LLVM produce nearly the same binary size in 51% of the experiments. In 37% GCC wins and in 12% LLVM wins. In 94% of the experiments the difference between the resulting binary size in GCC and LLVM is +/-5%. The execution time analysis shows that in 42% of the experiments GCC and LLVM have nearly the same execution time clock cycles while in 40% GCC wins and in 18% LLVM wins.