[LLVMdev] OpenMP/autopar support in LLVM (original) (raw)

Tobias Grosser tobias at grosser.es
Wed Jul 4 08:57:17 PDT 2012


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 . 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

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