This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4] Add tables generation
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Michael Zolotukhin <michael dot v dot zolotukhin at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Apr 2014 21:25:51 +0400
- Subject: Re: [gomp4] Add tables generation
- Authentication-results: sourceware.org; auth=none
- References: <532B1C45 dot 9020308 at codesourcery dot com> <87vbusi3qy dot fsf at kepler dot schwinge dot homeip dot net> <87ioqsi0w8 dot fsf at kepler dot schwinge dot homeip dot net> <533D8894 dot 4010706 at codesourcery dot com> <CADG=Z0FfqQTHJURFKW93ZJiEDV=XB0WhELUobPBngqzB37JQcw at mail dot gmail dot com> <533D9509 dot 4070800 at codesourcery dot com>
2014-04-03 21:06 GMT+04:00 Bernd Schmidt <bernds@codesourcery.com>:
> On 04/03/2014 06:53 PM, Ilya Verbin wrote:
>>
>> 2014-04-03 20:13 GMT+04:00 Bernd Schmidt <bernds@codesourcery.com>:
>>>
>>> The patch below should be a better fix, making the references to >
>>> __OPENMP_TARGET__ weak. Does this work for you?
>>
>>
>> Shouldn't we just remove __OPENMP_TARGET__ argument from GOMP_target,
>> since we decided to pass it to GOMP_offload_register?
>
>
> I thought it was used to look up the right function? With shared libraries
> you'd get multiple __OPENMP_TARGET__ tables.
>
>
> Bernd
>
Yes, initially the idea was to use it for look up the right function.
But now each DSO will call GOMP_offload_register, and pass unique
pointer to __OPENMP_TARGET__ (host_table) for this DSO. Then
gomp_register_images_for_device registers all this host tables in the
plugin. And when libgomp calls device_get_table_func, the plugin
returns the joint table for all DSO's.
-- Ilya