5 ms·
Intel's modern compilers (icx, icpx) are clang-based. There is an open-source version [1], and the closed-source version is built atop of this with extra closed
by hjabird 3y ago
Intel's modern compilers (icx, icpx) are clang-based. There is an open-source version [1], and the closed-source version is built atop of this with extra closed-source special sauce.
AOCC and ROCm are also based on LLVM/clang.
[1] https://github.com/intel/llvm https://github.com/intel/llvm
- sevagh 3y agoI forgot to ask my question which was "why are vendor compilers based on clang over gcc", but it must be related to LLVM?
- xcdzvyn 3y agoIf I had to guess, permissive licensing, better platform support, and the perception of LLVM being easier to target than GCC.
- outworlder 3y agoLLVM is a big part of it. GCC is more opaque (and monolithic) in comparison. Having an intermediate language and a modular architecture makes it easier to build specialized compilers.
- SubjectToChange 3y agoAnother selling point is the Clang CFE, which amortizes the complexity of C++ parsing and semantic analysis, much to the chagrin of the Edison Design Group.
- pjmlp 3y agoMeanwhile EDG are the ones coming up with an usable reflection proposal for C++26, and since Apple and Google stepped out, not many of those profiting from clang are that eager to contribute to upstream fronted.
- SubjectToChange 3y agoI was surprised to see they were even still active, much less leading the way on reflection. Hopefully they will manage to stick around. Anyway, such a pessimistic view of Clang/LLVM is unwarranted IMO. I have yet to see any metrics that imply their abandonment. Also, considering that Google is likely closer to 300 million LOC than 200 million, they really don't have a choice. Likewise for Apple unless they’ve given up on WebKit and LLVM for Swift.
- pjmlp 3y agoOne metric is the amount of red in cppreference. Apple and Google are perfectly fine with C++17 for their purposes, which is the version used by LLVM to compile itself.
- SubjectToChange 3y agoOne metric is the amount of red in cppreference. Sometimes one implementation's red box is better than another implementation's green box. Clang supports the majority of C++20. The biggest blocker on coroutines is a Windows ABI issue and concepts will be ready after a few DRs are polished off. Basically, other than some minor CTAD and non-type template parameter enhancements, the biggest feature lagging behind are modules. IMO, I'm not ready for modules, my dependencies are not ready for modules, neither is my IDE nor my build system. So, for my interests, C++20 support in Clang is more than sufficient. Apple and Google are perfectly fine with C++17 for their purposes, ... Well, yes, and they will likely be using C++17 for quite a bit longer. In particular, not only is C++20 a massive update to the language, but the rate of development in the llvm-project has far exceeded the rate at which maintenance capacity can be increased. Not to mention a myriad of other issues, notably the architectural problems in Clang.
- nickelpro 3y agoLLVM is a library for building compilers, GCC is not. It's pretty much that simple.
- pjmlp 3y agoIt is called GNU Compiler Collection for a reason.
- fooker 3y agoLLVM is so much easier to work with. You can get started on reasonable optimizations and be done with a prototype in hours, compared to days or weeks in gcc.