[LLVMdev] Inserting pthread_create call into sequential code

Pankit Thapar pankit at umich.edu
Mon Nov 12 18:22:49 PST 2012


Hi,

I was working on multithreading a cross iteration loop. I want to insert a
pthread_create function call and use other pthread functions into my LLVM
IR.

Issue is how do i get these functions using
module->getOrInsertFunction("pthread_create"), since the function might not
be there in IR and then insert function calls to these functions.

So, crux is how do i call pthread function calls into LLVM IR for a
sequential program.

Pardon me for such a basic doubt as I am a novice in llvm yet.

Regards,
Pankit Thapar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121112/4e7f02ae/attachment.html>


More information about the llvm-dev mailing list