multithreaded applications

Hi all:

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 ?

Thanks a lot for your help.

Regards

aparna kotha wrote:

Hi all:

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.

Luke

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.

-bw

I am using pthreads.

I was also wondering what will the llvm IR be for pthreads ?

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.

-bw

Thanks Luke and Bill.

Aparna