[gomp] constify device data & fix cleanup

Nathan Sidwell nathan@acm.org
Wed Jul 15 00:09:00 GMT 2015


This patch turned out a little larger than expected as I ran into an API 
limitation between libgomp and the plugins.

The patch changes GOMP_offload_{,un}register to take a pointer to constant 
target data.  I've fixed up the two mkoffloads to constify their target data.

The other thing this does is change the interface between libgommp and the 
plugin's load_image and unload_image routines.  I've added the ability to return 
a pointer to target-specific connection data, and have it provided to the unload 
function.  The ptx routines allocate some storage during loading, but had no way 
to free it on onloading. (Actually, the unloading was rather broken, attempting 
to free the wrong thing.)  this data is stashed in the map created for 
host->target fns & vars.

There doesn't appear to be an intelmic plugin to modify.

ok for gomp4?

I expect the next patch in this series to break the API between mkoffload and 
libgomp -- adding version numbering.  I could do this just for PTX (and have an 
inferior long term solution), or modify intelmic too.  Preference?

nathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: launch-3.patch
Type: text/x-patch
Size: 18111 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150715/450fc451/attachment.bin>


More information about the Gcc-patches mailing list