This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][LTO] Fix for undefined references from vtables.
- From: Diego Novillo <dnovillo at google dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Dec 2008 10:36:10 -0500
- Subject: Re: [PATCH][LTO] Fix for undefined references from vtables.
- References: <498552560812041514r19f84b77yc01e727c3f8d0232@mail.gmail.com>
On Thu, Dec 4, 2008 at 18:14, Doug Kwan (éæå) <dougkwan@google.com> wrote:
> most likely not emitted or emitted in another file. This patch also
> changes the way we globalize cross-file statics. We now do that
> inside WPA instead of writing extra flags and letting LTRANS to do
> that.
Ah, much cleaner. Thanks.
> +/* Call-back for walk_tree. Examine the tree pointer to by TP and see if
> + if its a file-scope static variable of function that need to be turned
> + into a global. */
s/Call-back/Callback/
s/its/it's/
> + if (t == NULL_TREE)
> + return NULL;
> +
> + /* The logics for globalization of VAR_DECLs and FUNCTION_DECLs are
s/logics/logic/
> + switch (TREE_CODE (t))
> + {
> + case VAR_DECL:
> + walk_tree (&DECL_INITIAL (t), globalize_cross_file_statics, context,
> + context->visited);
Easier to move this up to the VAR_DECL handler above, just after
the call 'bitmap_set_bit (context->all_vars, DECL_UID (t))'
> +/* Helper of lto_scan_statics_in_cgraph_node below. Scan TABLE for
> + static decls that may be used in more than one LTRANS file.
> + CONTEXT is a globalize_context_t storing scanning states. */
s/storing/for storing/
> - /* Return if node has no function body. */
> - if (!node->analyzed)
> + /* Return if node has no function body or not the master clone. */
s/node/NODE/
s/or not/or is not/
OK with those changes.
Diego.