[cfe-dev] CLOMP: OpenMP frontend for Clang (and much more)
Simone Pellegrini
spellegrini at dps.uibk.ac.at
Tue May 8 06:11:39 PDT 2012
Dear all,
I worked for some time on an OpenMP frontend based on Clang. This is not
just an OpenMP frontend but a more comprehensive framework to handle
user defined pragmas. OpenMP is implemented just to test its
functionalities. This was implemented as part of a bigger project called
insieme which is developed at the university of Innsbruck (
http://insieme-compiler.org/). Several people asked me to release this
code since long time and I finally took some time to isolate the pragma
handling mechanism from the rest of the project and open source it. This
is only the frontend part, there is no backend. Therefore, if you happen
to have an OpenMP backend for LLVM and you need a frontend then you just
found your soul mate :)
I host this code in the following repository:
https://github.com/motonacciu/clomp
This project contains the infrastructure for pragma handling and the
OpenMP frontend. It doesn't work on the current SVN release on clang. It
requires LLVM/Clang 3.0 and additionally a small patch has to be applied
to Clang in order for the all thing to work. However the patch can be
easily updated to work with the latest clang. The project contains a
couple of examples that show how it is meant to be used.
In order to compile the project you need to do 2 things. First of all
install the patched version of LLVM/Clang. This can be done by running
the llvm-3.0-installer.sh script stored in the script folder. Clomp is
built with cmake. Specify the LLVM_HOME=/path/to/patched-llvm env
variable when you run CMAKE. It is required to set up some internal
paths. (I will add installation instruction in the project web page soon)
It would be nice to have the code in Clang (so that I don't have to
update the patch every time a new release of clang comes along) but I
really have no time to rewrite everything to conform with the coding
style of LLVM. I use C++11 a lot and templates as well and I know LLVM
how people here feel about those things. :) Also the code was first
written more than 1 year ago and I suppose in the meantime several
things have changed in Clang and probably there is an easier way to do
some of the things. If someone is interested in taking over the effort
of going through a code review and port it into clang I can help, just
contact me. The code is well tested and functional. It can handle
several OpenMP benchmark codes like the NAS Parallel Benchmarks and
Rodinia benchmarks.
Everyone can use it. If you do so, please cite. I am open to research
collaborations.
cheers, Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120508/4807df58/attachment.html>
More information about the cfe-dev
mailing list