This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Go patch committed: Don't call cgraph_mark_needed_node
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Sat, 21 Apr 2012 00:10:37 +0200
- Subject: Re: Go patch committed: Don't call cgraph_mark_needed_node
- References: <mcrr4vi6qx7.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
> Honza removed the function cgraph_mark_needed_node from mainline. The
> Go frontend called it, but that call was left over from days long ago
> when package initialization was run as a global constructor. Package
> initialization is now done by a direct call from the main function
> (found in libgo/runtime/go-main.c), so the function is no longer special
> from a cgraph point of view. This patch just removes the call to
> cgraph_mark_needed_node. Bootstrapped and ran Go testsuite on
> x86_64-unknown-linx-gnu. Committed to mainline.
>
> Ian
>
> diff -r 2247d6aae86d go/gogo-tree.cc
> --- a/go/gogo-tree.cc Fri Apr 20 13:09:25 2012 -0700
> +++ b/go/gogo-tree.cc Fri Apr 20 14:19:43 2012 -0700
> @@ -495,7 +495,6 @@
> gimplify_function_tree(fndecl);
>
> cgraph_add_new_function(fndecl, false);
> - cgraph_mark_needed_node(cgraph_get_node(fndecl));
Note that cgraph_add_new_function actually calls cgraph_mark_needed_node implicitely.
Thanks for fixing this!
Honza