This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, CHKP] Fix ipa-comdats for instrumentation thunks
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 6 Apr 2015 19:15:22 +0300
- Subject: Re: [PATCH, CHKP] Fix ipa-comdats for instrumentation thunks
- Authentication-results: sourceware.org; auth=none
- References: <20150402154507 dot GD6244 at msticlxl57 dot ims dot intel dot com> <20150402170423 dot GC21276 at atrey dot karlin dot mff dot cuni dot cz> <CAMbmDYYKxqKG5CdOpSVQO2YF-96v2s6OvQaCMiZkNXp3h63u6Q at mail dot gmail dot com> <20150403171256 dot GQ21276 at atrey dot karlin dot mff dot cuni dot cz>
2015-04-03 20:12 GMT+03:00 Jan Hubicka <hubicka@ucw.cz>:
>>
>> Currently ipa_comdats doesn't set comdat groups for thunks. At the
>
> I see, that is a bug. It is supposed to keep thunks in the same section
> as their target (thunks doesn't really work across sections on some target,
> like PPC, because there is no way to produce a tailcall)
> Does the following fix the problem?
I believe this should help. Will try it.
Thanks,
Ilya
> Index: ipa-comdats.c
> ===================================================================
> --- ipa-comdats.c (revision 221857)
> +++ ipa-comdats.c (working copy)
> @@ -377,12 +377,12 @@
> fprintf (dump_file, "To group: %s\n", IDENTIFIER_POINTER (group));
> }
> if (is_a <cgraph_node *> (symbol))
> - dyn_cast <cgraph_node *>(symbol)->call_for_symbol_and_aliases
> + dyn_cast <cgraph_node *>(symbol)->call_for_symbol_thunks_and_aliases
> (set_comdat_group_1,
> *comdat_head_map.get (group),
> true);
> else
> - symbol->call_for_symbol_and_aliases
> + symbol->call_for_symbol_thunks_and_aliases
> (set_comdat_group,
> *comdat_head_map.get (group),
> true);
>