This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto][patch] Don't try to ipa-cp into inlined nodes
On Tue, Nov 25, 2008 at 10:15, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, Nov 25, 2008 at 09:38, Rafael Espindola <espindola@google.com> wrote:
>
>> 2008-11-25 Rafael Espindola <espindola@google.com>
>>
>> * ipa-cp.c (ipcp_insert_stage): Skip inlined nodes.
>
> Why would we want to do that? If a node has been inlined in only a
> few places, it doesn't mean that we want to stop IPCP on it. It may
> still be called uninlined from other nodes in the graph.
>
> I agree that if the node has been inlined *everywhere* it makes no
> sense to try to IPCP into it, but it also shouldn't cause an ICE.
> That's an efficiency issue, though.
After chatting offline about the patch, I see what is going on. The
cgraph node has been inlined, so we would want to do IPCP into the
non-inlined clone of the node, but not into the node itself. Sorry I
missed this earlier.
The patch is OK with one formatting change:
> - if (!node->analyzed || !ipcp_node_modifiable_p (node))
> + if (!node->analyzed || !ipcp_node_modifiable_p (node)
> + || node->global.inlined_to)
Align the '||' vertically.
Diego.