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.