A Compiler Comparison in the RISC-V Ecosystem

Printer-friendly versionSend by emailPDF version

Mehrdad Poorhosseini, University of Oldenburg, DE

Authors: Mehrdad Poorhosseini, Kim Grüttner, Wolfgang Nebel, University of Oldenburg, DE

Abstract

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.

Biography

Mehrdad Poorhosseini, University of Oldenburg, DEMehrdad Poorhosseini received the M.Sc. degree in Computer engineering from Qazvin Azad University, Qazvin, Iran, in 2015. He is currently pursuing the Ph.D. degree with the Department of Computing Science, University of Oldenburg, Germany.
His current research interests include computer architecture, embedded systems, and RISC-V architecture.