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:38:57 +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> <CADG=Z0GUi8UDookgwcd0AzDjWDS9pWyqt-c8GRyM3=gjrwg_zQ at mail dot gmail dot com> <533D9A4A dot 1040001 at codesourcery dot com>
2014-04-03 21:28 GMT+04:00 Bernd Schmidt <bernds@codesourcery.com>:
> On 04/03/2014 07:25 PM, Ilya Verbin wrote:
>>
>> 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.
>
>
> Why make a joint table? It seems better to use the __OPENMP_TARGET__ symbol
> to restrict lookups to the subset of symbols that could actually be found.
> BTW, I still expect that the lookup by ordering will turn out to be
> fundamentally unreliable and we'll need to use the unique id patch I posted
> a while ago. In that case using __OPENMP_TARGET__ as a first order key for
> the lookups eliminates any problem with duplicate names across multiple
> libraries.
>
>
> Bernd
>
In current implementation each gomp_device_descr contains one
dev_splay_tree. And all addresses are inserted into this splay tree.
There is no need to restrict lookup, because the addresses from
multiple DSO's can't overlap.
-- Ilya