This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][LTO] Fix for undefined references from vtables.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]