OpenMP May Finally Come To LLVM/Clang

Written by Michael Larabel in Free Software on 16 January 2012 at 12:56 PM EST. 3 Comments
FREE SOFTWARE
Multi-threading in LLVM has been brought up and it looks like some developers may finally be taking on the challenge of bringing OpenMP support to this growing open-source compiler infrastructure.

While LLVM/Clang can build key pieces of software like Qt, the Linux kernel, LibreOffice, and much of the FreeBSD base, one shortcoming has been the lack of OpenMP support by this compiler.

OpenMP, the Open Multi-Processing API that's used by a number of programs for shared-memory multi-threaded programming in C/C++ (and Fortran too), hasn't been supported by LLVM. OpenMP is used by programs like GraphicsMagick and several of the benchmarks we commonly run at Phoronix as it's very efficient and effective for multi-process programming. OpenMP has been supported by GCC going back to their 4.3 release and is also handled by Intel's C Compiler and Sun Studio too.

From this ongoing discussion on the LLVM developers' mailing list since earlier this month (and continued in this thread), it looks like OpenMP support within LLVM/Clang may finally become actively worked on. Currently it's being discussed about handling LLVM-IR with OpenMP extensions.

One item brought up in the discussion that might be of some interest to Phoronix reader is the ROSE Compiler. ROSE is a compiler infrastructure that allows source-to-source translation of C, C++, and Fortran. OpenMP is also handled here as well. ROSE can also be used for building custom code analyzers and optimizers. Those wanting to find out more about that work can visit ROSECompiler.org.

There's no timeline for when we might see working OpenMP support in LLVM, but it would be nice for the next LLVM 3.1 release, which would allow for more multi-threaded applications to work well under LLVM/Clang and also improve some of the benchmark results.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week