Relax cgraph_node::clone_of_p to also look through former clones
authorMartin Jambor <mjambor@suse.cz>
Thu, 7 Mar 2019 16:03:34 +0000 (17:03 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 7 Mar 2019 16:03:34 +0000 (17:03 +0100)
commit1738b52201b1ce28c9f869646f5412b8937ccfe6
treecdb71e52faf06fd59ef5c90c4cebf832ea238b09
parent606711a1671cc63713b893c4557df967a5a6ac20
Relax cgraph_node::clone_of_p to also look through former clones

2019-03-07  Martin Jambor  <mjambor@suse.cz>

PR ipa/88235
* cgraph.h (cgraph_node): New inline method former_thunk_p.
* cgraph.c (cgraph_node::dump): Dump a note if node is a former thunk.
(clone_of_p): Treat expanded thunks like thunks, be optimistic if they
have multiple callees.  At the end check if declarations match as
opposed to cgraph_nodes.

testsuite/
* g++.dg/ipa/pr88235.C: New test.

From-SVN: r269462
gcc/ChangeLog
gcc/cgraph.c
gcc/cgraph.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/pr88235.C [new file with mode: 0644]