LFCS 2012: LLVM and Linux
Posted Apr 26, 2012 3:18 UTC (Thu) by pr1268
Parent article: LFCS 2012: LLVM and Linux
Interesting article. As someone who recently (two days ago) compiled and installed LLVM and Clang, I've been having fun lately rebuilding and benchmarking my own simple utilities (written in C or C++).
The short summary of my observation: Clang's compiled code runs slightly faster than GCC's (not to mention Clang code compiles faster), but the stripped ELFs are about the same size. Of course, I am aware that linking in pre-compiled libraries (e.g. glibc) means I'm including code outside the scope of Clang's compilation.
One weird Clang issue (I'll keep it brief): In a Mersenne Twister-based PRNG I've written, if I split a single source code .c file's two functions into their own files, and then recompile (separate .o files), then link everything together, my program doesn't run right (actually it doesn't run at all, but it appears to terminate normally). This only happens with Clang-compiled code (and only if I split the file's two functions into separate files), and not with GCC. Weird...
Regardless, I'm fascinated by the research and development emanating from the LLVM project. It'll be even more fun to see what's yet to come...
to post comments)