[LLVMdev] GSoC 2009: Extending LLVM IR to aid multi-core code generation

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon Mar 30 03:49:00 PDT 2009


Hi Milos,

Milos Puzovic wrote:
> Hi,
>
> I would like to extend LLVM IR with two new intrinsic: spawn and join. 
> The spawn intrinsic will indicate that the call it modifies can safely 
> run in parallel, while join intrinsic will indicate that the execution 
> of the current call cannot continue until all previously spawned calls 
> in the list/array passed as argument to join intrinsic have completed 
> and returned their results to it. This extension would allow us to 
> express strict multi-thread computations and introduce possibility of 
> new optimisations passes for parallel computations (see below for some 
> of them).
>
> Once this extension is added I plan to demonstrate its usability and 
> how expressible it is in two ways. Firstly, I will implement 
> randomized work-stealing algorithm in VMKit. 

Can you be more verbose on this? Are you planning to implement some JVM 
or .Net extension for supporting your new intrinsics? Or are you just 
looking for a runtime with a GC?

> This will effectively find an execution schedule that obeys 
> constraints imposed by the multi-thread computation. Secondly, I will 
> extend back-end of a multi-threaded processor (such as XCore) to 
> create threads when call is modified with spawn intrinsic and sync 
> them when join intrinsic is encountered. 

Why do you need to hack on a processor backend for such purpose? Aren't 
your OS primitives sufficient?

Nicolas



More information about the llvm-dev mailing list