create function

i need split a sequential program to multithread. the first step I am going to assign each basic block of program to a thread, so i want create a function for each basic block and add instruction of basic block into it and assign every function to a thread.
how could i do it?

I think you might be interested in ExtractCodeRegion() function.

- Jakub