[cfe-dev] OpenMP support

Chris Lattner clattner at apple.com
Fri Mar 14 09:26:41 PDT 2008

On Mar 14, 2008, at 4:13 AM, Ben Gaster wrote:
> I was wondering if there are any plans for support OpenMP within  
> Clang and more generally within LLVM? As I understand that the LLVM  
> GCC 4.2 frontend supports OpenMP but this is done via a lowing phase  
> to the GOMP library before LLVM code generation and LLVM does not  
> explicitly support OpenMP. The problem with this approach is that it  
> difficult to develop specific optimizations for OpenMP, although not  
> impossible, with the LLVM framework, and more over many standard  
> optimizations are not valid with the OpenMP memory model. For  
> example, an important optimization for OpenMP is barrier removal but  
> one would need to reconstruct this from the GOMP library rather than  
> optimizing for a general OpenMP representation and then code  
> generating for GOMP or alternative OpenMP runtime.

I don't think any current clang contributor is planing on working on  
OpenMP in the short term.  This would be a great project, but we'd  
need someone to tackle it.  I don't claim to know enough of the  
details of OpenMP to know how to best optimize for it in LLVM.  In the  
past, various research projects have proposed and built parallel  
extensions to the LLVM IR, but none got far enough along to be  
generally usable.


More information about the cfe-dev mailing list