It is up to par with commercial compilers we compare to. Our compiler clearly beats the “plain vanilla Clang” not only in speed, but most of all also in code size, as well as GCC by most measures. The results of the benchmarks we are running are promising. As we expected, it was challenging, but once familiar with Clang, we found this to be a good plan.įirst, we focused on improving the size and the performance of the generated code. Considering all of this, we decided to look closer at Clang, with a goal to using it to create our own compiler. ARM / Keil derived a compiler from Clang, discontinuing development of their previous proprietary compiler. In addition to that, Clang is under a more permissive license which permits making a commercially-available derivative. Both Clang and GCC have very advanced front ends, translating the source code into an intermediate representation (IR), and both generate excellent code.Ĭlang has the more modern design and is in general considered to be more advanced than GCC. To write a compiler from scratch and make it is as good as GCC or Clang is a lot of work. Paul has written multiple compilers in his career. We do have the expertise to design a compiler from scratch. There were basically three options available to get there: We felt there was one thing we should add: Our own compiler.Īlthough the included compilers, GCC and Clang, are well proven and widely used, it would be nice to have full control over the compiler, to maintain, tailor, and optimize it. Having everything in an easily downloadable package, fully integrated, and ready-to-use, makes things easy.
0 Comments
Leave a Reply. |