LLVM and Clang 3.2 released
llvm.org
llvm.org
"But, one of my pushes on the greater use of static analysis and verification technologies, is I pretty strongly suspect that the Clang LLVM sort of ecosystem that's living on OS X is going to be, I hope, fertile ground for a whole lot of analysis tools and we'll wind up benefiting by moving more of our platform continuously onto OS X just for that ability to take advantage of additional tools there." [1]
Pure, FAUST, Julia, Clay are all very promising and I didn't know about Open Shading Language or Portable OpenCL.
[1] http://code.google.com/p/pure-lang/
http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/code-...
"[The LLVM backend] is an alternative backend that uses the LLVM compiler to produce executable code. It generally produces code as with performance as good as the native code generator but for some cases can produce much faster code. This is especially true for numeric, array heavy code using packages like vector. The penalty is a significant increase in compilation times."
In a nutshell, it brings nVidia's SPMD programming model to normal SIMD-capable processors. Any CUDA code out there is almost trivial to convert.
The original link points to some draft version with lots of placeholder text throughout.
I gave it a very quick look however got missing DLL messages (pthreadGC2) when trying to compile. I don't have the time to look into it today, hopefully over the Christmas break I will be able to get it working. If I do I will look at how sensible it is to maintain a similar Windows build. A standard Windows build available as an archive or an installer would be great.
EDIT: The error messages look like they may be related to Cygwin although I could be totally wrong on that, it is just the readme mentions Cygwin but nothing else :)
set PATH=C:\Windows\system32;c:\MinGW32\bin;c:\llvm\bin
set CPATH=C:\MinGW32\include
and got clang 3.2 to work in 32-bit mode: pathclang.bat
clang -m32 -o hello.exe hello.c
hello.exe
Alas, it appears that 64-bit mode is currently unsupported on Windows.Seems like a very nice feature though.
[1]: First time I've heard this term. I'm not sure how I feel about it.
More info on ObjC blocks vs C++ lambdas in this blog posting: http://www.mikeash.com/pyblog/friday-qa-2011-06-03-objective...
For example, OpenShadingLanguage compiles shaders on the fly as part of a physically-based renderer, and then JITs them at runtime with LLVM. Linked in are the LLVM libs and a bunch of C code that is converted to LLVM IR and accessed by the shaders. The whole lot is linked and JITd together, enabling interprocedural analysis, inlining and a bunch of other compiler optimizations (e.g. constant folding). The resulting shaders are about 25% faster than their previous, hand-coded C shaders.
IOW, lots of products benefit from having a compiler toolchain at runtime they can link with their program. GPL license or not, GCC isn't made to do that.
Also with it being under BSD, they can write their own closed source extensions or reuse portions of their code in their own projects.
(first mail) http://lists.racket-lang.org/users/archive/2012-April/051303...
(most relevant mail) http://lists.racket-lang.org/users/archive/2012-April/051319...
They use the LGPL license. The idea is that you can make closed source programs that link to the Racket system as a library, but you must provide a version that is linkable to newer versions of Racket. But in Racket the macro expansions are a fundamental part so the more strict interpretation means almost that you must provide the original source code in plain text.
I don't know enough about licenses, perhaps this is only FUD. And my impression is that the intensions of the Racket creators is that closed source programs in Racket are allowed, but this looks like a gray area.
And the GPL license is more restrictive, but C/C++ has many less macros/templates than Racket.
# clang -v
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
# clang hello_world.c
/usr/include/features.h:324:10: fatal error: 'bits/predefs.h' file not found
# clang -m32 hello_world.c # (No error)
That's not right, surely?If you see that on 32-bit ones, file a bug.
There seemed to be some special magic in the gcc build for Debian-derived distros. It wasn't all controllable with command-line options.
You and Clang may be encountering similar fun.
That seems unusual of Apple, but very cool.
EDIT - Looking at the clang source, it looks like GNUstep and and ObjFW (with the exception of old GCC) are the only alternative Objective-C runtimes currently supported by clang: http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html
LLVM, http://llvm.org/releases/3.2/docs/ReleaseNotes.html
Clang: http://llvm.org/releases/3.2/docs/ClangReleaseNotes.html
The project has recently moved to Sphinx, and the transition was only completed after branching for 3.2. It looks like the release notes have gotten out of sync and need to be merged, which is a little more work than usual. The link from the homepage points to docs that are always generated from trunk, so it only has old, incomplete notes.