Chris Lattner
2006-Jan-25 00:14 UTC
[LLVMdev] New GCC4-based C/C++/ObjC front-end for LLVM
Hi Everyone, I just pushed out the latest version of my new GCC4-based llvm-gcc here: http://gcc.gnu.org/ml/gcc/2006-01/msg00931.html This email includes status and instructions for use. Compared to the old llvm-gcc, this front-end has many advantages: it is far faster, is based on GCC 4.0.1 instead of a GCC 3.4 prerelease snapshot, and it fixes several dozen of the "impossible to fix in the old front-end" bugs revolving around bitfield layout and static initialization global unions (see http://llvm.cs.uiuc.edu/PR498 for examples). This front-end is different than the old llvm-gcc in several ways: in particular, it defaults to acting like a *normal* compiler. Specifically: 1. "llvm-gcc x.c -S -o x.s" will give you an *unoptimized* *native* assembly file, not an unoptimized LLVM .ll file. 2. "llvm-gcc x.c -c -o x.o" will give you an *unoptimized* *native* object file, not an *optimized* LLVM .bc file. 3. "llvm-gcc x.c" will give you a native a.out, not a .bc file. 4. -O[123] flags change the output of the compiler, though they are all very basic. The new compiler does not yet run all of the optimizations the old one did with "-c". 5. The new front-end does not exec gccas/gccld, instead it links to the appropriate LLVM libraries. 6. Link-time IPO hasn't been implemented yet. Finally, note that passing both the new and old front-ends "-S -emit-llvm" will cause them both to behave the same: they both write an LLVM .ll file to the .s file. This allows the testsuite to work with both front-ends. I would appreciate it if people would try it out and see how it works for them. I'd like to add support for the Alpha, itanium, and sparc backends, but would like the target maintainers to test it for basic functionality. The link above includes instructions to build the new front-end. If you build with --program-prefix=llvm- and configure LLVM with the installed compiler, you can run the llvm-test suite as normal, using the new front-end instead of the old one. Ideally, I would like to "ship" this front-end along with the current front-end for the next LLVM release (1.7), and then drop the old llvm-gcc for the next one (1.8). Comments and questions welcome, -Chris -- http://nondot.org/sabre/ http://llvm.org/
Vladimir Prus
2006-Mar-01 16:12 UTC
[LLVMdev] Re: New GCC4-based C/C++/ObjC front-end for LLVM
Chris Lattner wrote:> > Hi Everyone, > > I just pushed out the latest version of my new GCC4-based llvm-gcc here: > http://gcc.gnu.org/ml/gcc/2006-01/msg00931.html > This email includes status and instructions for use.The instructions seem to have one path wrong. It says to get: svn://gcc.gnu.org/svn/gcc/branches/apple/trunk/gcc, revision 108127. but the patch won't apply to that directory, because it tries to change things under libstdc++-v3 and so on. I suppose that svn://gcc.gnu.org/svn/gcc/branches/apple/trunk (without 'gcc' at the end) is right. Not a big issue, but might confuse casual users. - Volodya
Chris Lattner
2006-Mar-01 17:49 UTC
[LLVMdev] Re: New GCC4-based C/C++/ObjC front-end for LLVM
On Wed, 1 Mar 2006, Vladimir Prus wrote:>> I just pushed out the latest version of my new GCC4-based llvm-gcc here: >> http://gcc.gnu.org/ml/gcc/2006-01/msg00931.html >> This email includes status and instructions for use. > > The instructions seem to have one path wrong. It says to get:I'll put together a tarball today. That will be easier than dealing with a patch, and it will include a bunch of bugfixes since the previous email. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Reasonably Related Threads
- [LLVMdev] Re: New GCC4-based C/C++/ObjC front-end for LLVM
- [LLVMdev] New GCC4-based C/C++/ObjC front-end for LLVM
- [LLVMdev] Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
- [LLVMdev] Re: Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
- [LLVMdev] Re: Re: Re: Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM