Re: [gomp4 07/14] libgomp nvptx plugin: launch target functions via gomp_nvptx_main

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 11:19:06PM +0200, Bernd Schmidt wrote: > On 10/20/2015 11:13 PM, Alexander Monakov wrote: > >On Tue, 20 Oct 2015, Bernd Schmidt wrote: > > > >>On 10/20/2015 08:34 PM, Alexander Monakov wrote: > >>>2. Make gomp_nvptx_main a device (.func) function. To have that work, > >>>

Re: [gomp4 07/14] libgomp nvptx plugin: launch target functions via gomp_nvptx_main

2015-10-20 Thread Bernd Schmidt
On 10/20/2015 11:13 PM, Alexander Monakov wrote: On Tue, 20 Oct 2015, Bernd Schmidt wrote: On 10/20/2015 08:34 PM, Alexander Monakov wrote: 2. Make gomp_nvptx_main a device (.func) function. To have that work, we'd need to additionally emit a "trampoline" of sorts in the NVPTX backend. For

Re: [gomp4 07/14] libgomp nvptx plugin: launch target functions via gomp_nvptx_main

2015-10-20 Thread Alexander Monakov
On Tue, 20 Oct 2015, Bernd Schmidt wrote: > On 10/20/2015 08:34 PM, Alexander Monakov wrote: > > 2. Make gomp_nvptx_main a device (.func) function. To have that work, we'd > > need to additionally emit a "trampoline" of sorts in the NVPTX backend. For > > each OpenMP target entrypoint foo$_omp_

Re: [gomp4 07/14] libgomp nvptx plugin: launch target functions via gomp_nvptx_main

2015-10-20 Thread Bernd Schmidt
On 10/20/2015 08:34 PM, Alexander Monakov wrote: The approach I've taken in libgomp/nvptx is to have a single entry point, gomp_nvptx_main, that can take care of initial allocation, transferring control to target region function, and finalization. At the moment it has the prototype: void gomp_nv

[gomp4 07/14] libgomp nvptx plugin: launch target functions via gomp_nvptx_main

2015-10-20 Thread Alexander Monakov
The approach I've taken in libgomp/nvptx is to have a single entry point, gomp_nvptx_main, that can take care of initial allocation, transferring control to target region function, and finalization. At the moment it has the prototype: void gomp_nvptx_main(void (*fn)(void*), void *fndata); but it'