OpenMP support

Hi,

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.

Thanks,

Ben

Benedict R. Gaster

S/W Architecture Team Lead

ClearSpeed Technology Plc

3110 Great Western Court

Hunts Ground Road

Stoke Gifford

Bristol

BS34 8HP

Phone: + 44 117 3172016

Fax: + 44 117 3172002

brg@clearspeed.com

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.

-Chris