I am working on a project using llvm and we need to deal with multithreaded applications. I wanted to know if there was a C front end for llvm that could parse multithreaded applications? I tried llvm-gcc (4.2) and could not get it to work. Is there an extra parameter that I need to pass or something ?
I am working on a project using llvm and we need to deal with multithreaded applications. I wanted to know if there was a C front end for llvm that could parse multithreaded applications? I tried llvm-gcc (4.2) and could not get it to work. Is there an extra parameter that I need to pass or something ?
Just the standard flags should work. We define -D_REENTRANT during compilation and -lpthread during linking. We also have no problem with OpenMP (-fopenmp -lgomp) if that's what you are using. You'll need to adjust this for whatever threading package you use.
What type of multithreaded language are you using? If it's something
other than C/C++/ObjC using MPI, pthreads, or OpenMP, then you'll have
to find a front-end that will parse your language and then add support
to it to emit LLVM.
Okay. Luke gave hints on how to get pthreads to work. LLVM doesn't do
anything special for pthreads calls. So they should look like regular
calls into a library.