Live data from Hacker News

Intel C/C++ compilers complete adoption of LLVM

software.intel.com

81–90 of 169 posts

Re: Intel C/C++ compilers complete adoption of LLVM

#81

Anyone actually use Intel compilers

Yes. Very good optimisation (to be expected), but without the insane exploitation of UB that the GCC/Clang crowd seem to think is necessary for optimisation. Instruction scheduling and selection probably makes the biggest difference.

Re: Intel C/C++ compilers complete adoption of LLVM

#82
post #68

Earlier quoted context omitted.

The ongoing efforts to add a Rust frontend to GCC prove otherwise. No Rust in GCC? No play.

Unlike C/C++, there is one canonical rustc where the language is developed and GCC will likely always play catch up.

It doesn't matter, if only GCC gets to play with Linux kernel.

Rust is only following down the footsteps of D and Go.

Re: Intel C/C++ compilers complete adoption of LLVM

#83
post #72

Earlier quoted context omitted.

Wasn't LLVM reinventing the wheel at the time? They could just collaborate to GCC.

They wanted to, but RMS wasn't interested at that time: https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00... I have also been told by more than one person that does professional compiler development that GCC's codebase is very difficult to work with. At least some commentary I've read suggests that this was a deliberate choice on the part of the GNU project.

> I have also been told by more than one person that does professional compiler development that GCC's codebase is very difficult to work with.

Add another. (Now-former professional compiler developer.)

> At least some commentary I've read suggests that this was a deliberate choice on the part of the GNU project.

This is the ‘RMS loophole’ in the GPL. In theory you can do what you want with the source; in practice you need help from the insiders.

Re: Intel C/C++ compilers complete adoption of LLVM

#84
post #27

Earlier quoted context omitted.

> Don't want to end up with every C/C++ compiler being a clang skin in the same way as (almost) every browser is a chrome skin. Why not ? There is one open C++ spec, that's really hard to implement, so we have a dozen C++ compilers that are impossible to support properly because they each have their own set of different ten thousand bugs. The value of supporting all of this is really small in practice, and the cost f…

We did have one major C++ compiler on Windows (MSVC) and one major C++ compiler elsewhere (GCC) and they both stagnated in many areas before Clang came along and forced them to advance to stay competitive.

GCC wasn't elsewhere.

Up to 2005 I was using UNIX own C++ compilers, meaning aCC, xlC, SunPRO.

Then there were Microchip, ARM, TI,...

Re: Intel C/C++ compilers complete adoption of LLVM

#85
post #24

Earlier quoted context omitted.

> Also: if icc is going to go with LLVM as a backend, then what is the point of using icc at all? Why not just use clang? From the blog post: " Not all our optimization techniques get upstreamed—sometimes because they are too new, sometimes because they are very specific for Intel architecture. This is to be expected and is consistent with other compilers that have adopted LLVM. " I don't see any good technical reaso…

What that sentence actually means is "we don't want to help our competition (AMD, NVIDIA) but we don't want to re-implement the wheel". The API and fundamental part of LLVM is its IR, LLVM-IR, which is where most optimizations happen. From this point-of-view, LLVM is a "platform", and an extremely brittle one: every release has breaking changes to the IR, the IR is constantly evolved to support new hardware and new o…

I like this strategy to encourage contributing back to open source by being a huge and foundational and producing so fast that the cost of forking is almost never worth it except in extreme circumstances. This feels more like voluntary cooperation than being smacked in the face with ~~the book~~ a license. Though I suppose it wouldn't always work if you're not a big project with lots of contributions.

Re: Intel C/C++ compilers complete adoption of LLVM

#86
It's still a little strange to me the whole free compiler thing. I used to pay hundreds of dollars each for, first Turbo C/C++, then Borland C/C++ and Zortech C/C++. I think IBM's C/C++ for OS/2 was the first time the compiler came free with an OS that I had on my computer and I was literally shocked that it included—for free—the GUI for building GUI applications. I guess being old is what makes me perfectly fine with paying for tools like IntelliJ which are a relative bargain.

Re: Intel C/C++ compilers complete adoption of LLVM

#87
post #86

It's still a little strange to me the whole free compiler thing. I used to pay hundreds of dollars each for, first Turbo C/C++, then Borland C/C++ and Zortech C/C++. I think IBM's C/C++ for OS/2 was the first time the compiler came free with an OS that I had on my computer and I was literally shocked that it included—for free—the GUI for building GUI applications. I guess being old is what makes me perfectly fine wit…

Early Unix systems came with bundled compiler toolchain. I think it was the SunOS which unbundled it first.

Re: Intel C/C++ compilers complete adoption of LLVM

#88
post #9

I'm not sure I love this. I mean, LLVM is awesome and everthing, but software monocultures are pretty bad. It's not like the situation is dire yet (given that there are also GCC and MSVC), but you can imagine a situation in a couple of years when Microsoft goes "yeah, we're also gonna go with LLVM now" and also GCC starting to fade away. It's a bit concerning. Also: if icc is going to go with LLVM as a backend, then…

I'd imagine it'd be hard for MSVC and gcc to fade away --- gcc has some notable architectural differences from llvm (such as having multiple, layered IRs) and on some optimizations gcc is stronger. While for MSVC they target Microsoft's own ABI. Unlike other technologies that already feature a monocultural landscape I guess it's fair to say there's no one, single, best way to design a compiler that accounts for the wide-ranging differences of backend architectures and frontend languages (in addition, when you compare the costs of developing a brand new compiler with say, developing a new CPU architecture, you'll find the price associated with the former is much more affordable, and might be reasonable under different circumstances).

Re: Intel C/C++ compilers complete adoption of LLVM

#89
post #43

Earlier quoted context omitted.

That was ions ago, and if not for anything else, Linux kernel will keep GCC around. Azure Sphere OS is also GCC only, despite Microsoft's new foundled love for clang.

There is significant investment in building Linux with Clang so I wouldn't count on Linux keeping GCC relevant forever. Doubly so with the inevitable rustc requirement.

Isn't that the other way around? I thought clang was trying to support all gcc extensions to be able to build Linux kernel.

I would rather see both of these compilers to stay competitive to push themselves higher.

Re: Intel C/C++ compilers complete adoption of LLVM

#90
post #9

I'm not sure I love this. I mean, LLVM is awesome and everthing, but software monocultures are pretty bad. It's not like the situation is dire yet (given that there are also GCC and MSVC), but you can imagine a situation in a couple of years when Microsoft goes "yeah, we're also gonna go with LLVM now" and also GCC starting to fade away. It's a bit concerning. Also: if icc is going to go with LLVM as a backend, then…

> Also: if icc is going to go with LLVM as a backend, then what is the point of using icc at all? Why not just use clang? From the blog post: " Not all our optimization techniques get upstreamed—sometimes because they are too new, sometimes because they are very specific for Intel architecture. This is to be expected and is consistent with other compilers that have adopted LLVM. " I don't see any good technical reaso…

>> I'm all for Intel helping improve LLVM, but the technical arguments for maintaining a separate commercial version don't convince me at all.

This is exactly why GCC is GPL and why RMS didn't want to make it more modular. Taken to the extreme we could end up with proprietary hardware that requires a proprietary (closed) compiler even though it's built on open source. Going back to "trusting trust" things might not be so good, and we know Intel is happy to build untrustworthy chips.

Post reply on HN