[LLVMdev] OpenMP/autopar support in LLVM

Raghavendra, Prakash Prakash.Raghavendra at amd.com
Wed Jul 4 09:34:39 PDT 2012


Hi Tobi

Thanks a lot for your detailed update on the status of OpenMP in LLVM.

It looks like there is no "official" support of OpenMP in LLVM 3.x at least.

In your descriptive list, I can see that [a] is an optional patch or available in GCC, [b] & [c] are
available as optional runtimes (which have to be carefully bundled). [d] anyway is little
different from OpenMP (can exist without OpenMP support in fact).

Thanks 

Regards
Prakash

-----Original Message-----
From: Tobias Grosser [mailto:tobias at grosser.es] 
Sent: Wednesday, July 04, 2012 9:27 PM
To: Raghavendra, Prakash
Cc: llvmdev at cs.uiuc.edu; preston.briggs at gmail.com
Subject: Re: [LLVMdev] OpenMP/autopar support in LLVM

On 07/04/2012 10:35 AM, Raghavendra, Prakash wrote:
> Hi
>
> I wanted to know the status of OpenMP (or in general auto
> parallelization) support in
>
> LLVM.
>
> I read some threads discussing about possible effort in that direction 
> in 3.1 onwards,
>
> but did not see any further discussion on that.
>
> If someone in the list knows the updated info or can point me to any 
> useful info,
>
> that would be useful.

Hi Prakash,

OpenMP consists of several things:

a) Support for parsing C/FORTRAN OpenMP pragmas

For clang (the C frontend) there are patches available from Simone Pellegrini <spellegrini at dps.uibk.ac.at>. They have not been reviewed and are based on a very generic pragma infrastructure. This is especially nice for research, but it needs to be evaluated if this generic implementation has performance impacts that are too large for production codes.

With dragonegg FORTRAN and C code (including OpenMP pragmas) can be lowered to LLVM-IR.

b) Support for representing OpenMP in LLVM-IR

There is no specific support in LLVM-IR for OpenMP. Currently OpenMP is represented as a bunch of function calls to a specific openmp run time library. It might be nice to formalize this more to represent OpenMP code in a runtime independent way and to allow the inlining of simple openmp runtime calls directly into the code.

c) An OpenMP runtime

There are two open source runtimes I am aware of. The GNU OpenMP runtime and MPC [1]. Both are interesting, but we need to be careful with the licenses.

d) Automatic Parallelization

- There is Polly [2] which I am working on. Polly can automatically parallelize SCoPs. It uses the algorithm developed in Pluto [3] for this.

- There are a couple of research projects working on speculative parallelization. "Jimborean Alexandra" from Strasbourg was e.g. working on this.

- There is a project called "Parallelization for LLVM" [4]. They have a lot of interesting stuff on the website, but I am not sure about the progress. Preston should be able to give details here.

Cheers
Tobi

[1] http://mpc.sourceforge.net/
[2] http://polly.sf.net
[3] pluto-compiler.sourceforge.net/
[4] https://sites.google.com/site/parallelizationforllvm/






More information about the llvm-dev mailing list