Last week, Mark Mitchell, the GM of our Open Source Solutions business unit hosted a webinar on the topic of C & C++ development for custom instruction set architectures with GNU or LLVM toolchains. With over 800 registrants, this event turned out to be one of our most popular webinars this year.
If you are designing SoCs and are either already using or planning to leverage open source technology, you will greatly benefit from this presentation. After delving into the pros/cons of licensing an ISA versus building a custom ISA, the presentation shares the characteristics of the two popular open source compilers; GCC and Clang which could be used to target your architecture. The session then covers the typical work involved in building a compiler for a custom instruction set architecture.
People interested in more details will also find Mark’s whitepaper on building a GNU-based toolchain quite valuable.
In the extensive QnA session towards the end, Mark was joined by other members of his team; Meador Inge, Iain Sandoe, and Nathan Sidwell -all of whom are actively involved in the open source community. The audience raised several interesting questions and here is a sampling of some of these:
Q. Can you comment on the relative compile times of GCC versus LLVM?
A. I think it’s pretty well established that the debug compile cycle (-O0/-g) is often/always quicker with Clang/LLVM
Q. We use lots of custom sections in our linker script (GCC) does LLVM offer the same control of the link stage?
A: The LLVM project has a sub-project for a linker named LLD. It has been making great progress lately, but has some work to go to match GNU LD.
Q. Is LLVM available with CLANG on Debian ?
A. Yes, it is and there has been work down to compile large parts of the Debian package set.
Q. Can GCC be used to retarget GPUs?
A: Yes, GCC can be targeted at GPGPUs. I’m aware of such ports.
Q. How efficient (in code-size) is LLVM? Could it be used in automotive applications?
A: I think that like performance the answer is “it depends”. I’ve heard that GCC has more focus on code size than LLVM, but both compilers continue to progress quickly, and the precise choice of benchmark and so forth will matter a lot.
Unfortunately, we ran out of time before we could get to all the questions. However, I will be following up any open questions in a future blog.
I hope you found this session as interesting as I did. If you have any questions about the presentation, please do post these on our Community.