logoalt Hacker News

wg0yesterday at 3:57 PM5 repliesview on HN

Noob question - Does gcc use LLVM anywhere under the hood or it has its own code generation and optimization pipeline? How does it stack in comparison to LLVM?


Replies

kouosiyesterday at 4:16 PM

> Does gcc use LLVM anywhere under the hood or it has its own code generation and optimization pipeline? No it doesn't use LLVM > How does it stack in comparison to LLVM? Well it support more targets then LLVM and in most cases it generates similar if not better executable.

sintaxyesterday at 5:45 PM

Let me wikipedia that for you :-) Like people mentioned already, gcc predates LLVM by quite some years, ie. Wikipedia mentions March 22, 1987 for gcc, while LLVM's initial release was 2003.

A big difference between the 2 is also the license. GCC uses the GPL while LLVM uses Apache License, hence the projects don't share code.

mshockwaveyesterday at 4:03 PM

> Does gcc use LLVM anywhere under the hood

No

ksherlockyesterday at 6:01 PM

The other answers (NO!) are correct, but... there was a gcc plug-in to use the llvm backend with gcc. Apple used llvm-gcc (circa 2012; gcc front end, llvm back end) while transitioning from gcc to llvm.

https://dragonegg.llvm.org

kelnosyesterday at 5:16 PM

GCC far far far predates LLVM. They do not share code.

show 1 reply