On 4/22/20 8:11 PM, Jan Hubicka wrote:
On Mon, 2020-04-20 at 11:34 +0200, Martin Liška wrote:
Hi.

The patch prevents a ifunc alias from removal in remove unreachable nodes.
Note that ifunc alias lives in a COMDAT section and so that
cgraph_node::can_remove_if_no_direct_calls_and_refs_p returned true for it.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
I was unable to create a lto test-case where a linked binary could be
scanned for assembly.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2020-04-20  Martin Liska  <mli...@suse.cz>

        PR lto/94659
        * cgraph.h (cgraph_node::can_remove_if_no_direct_calls_and_refs_p):
        Do not remove ifunc_resolvers in remove unreachable nodes in LTO.
OK
Is it intended to keep the comdat group alive even when the function is
not used by the current translation unit?

Yes, if you take a look at the mentioned PR, the function is exported and used
by a different TU.

Or do you have a particular test-case which you're talking about?

Martin


Honza
jeff


Reply via email to