GorillaPatch
GorillaPatch

Reputation: 5057

LLVM compiler for production code?

I have a question concerning the LLVM compiler:

I would like to use it to compile my Objective-C source code for Mac and iOS and from their release notes it seems that LLVM is stable enough for using this.

Having made good experiences with the LLVM I would also like to use it to compile C++ or Objective-C++. However it is not clear to me if I should still use the hybrid LLVM-GCC compiler (the GCC parser and the LLVM code generator) or the pure LLVM compiler.

I am also unsure about the new C++ standard library and if I should use it and how I would make the transition from GNU's libstdc++.

The Questions

  1. Which compiler would one use today to generate fast production quality code from C++: the LLVM-GCC hybrid compiler or pure LLVM?
  2. Should one migrate the C++ standard library from GNU's libstdc++ to the new libc++ library created by the LLVM project?

Any comments and hints are appreciated.

Upvotes: 3

Views: 1594

Answers (2)

Grzegorz Wierzowiecki
Grzegorz Wierzowiecki

Reputation: 10843

Remember, all this stuff is changing, so benchmarks gets easily outdated.

I've found following report interesting, not only as a kind of benchmark, but it seems showing some LLVM vs GCC compiler differences : Clang/LLVM Maturity Evaluation Report by Dominic Fandrey

Upvotes: 0

Anton Korobeynikov
Anton Korobeynikov

Reputation: 9324

Several questions asked here, I'll try to answer all of them.

  1. There is no "pure LLVM compiler". LLVM is a set of libraries which do code optimization and code generation . There are several C/C++ frontends which can be hooked to LLVM. Among them are clang and llvm-gcc. See http://llvm.org/ for more information about various components of LLVM Compiler Infrastructure. As written at http://llvm.org/docs/ReleaseNotes.html, llvm-gcc is EOL since LLVM 2.9 release, so you'd better use clang, because it will certainly be developed and maintained in the future.
  2. libc++ is still in development, so for production you should use vendor-provided C++ (libstdc++ in your case).

Upvotes: 7

Related Questions