public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix wrong code issues on x86 and LTO
@ 2013-08-05 15:00 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2013-08-05 15:00 UTC (permalink / raw)
  To: gcc-patches

Hi,
our handling of local flag (that define where register passing convention will be used)
is somewhat off. First we clear it on all functions that have call across partitions
and we also clear it on partial cgraph boundaries.
Fixed both,
Bootstrapped/regtested ppc64-linux, comitted.
	PR lto/57602
	* cgraph.c (verify_cgraph_node): Accept local flags from other partitions.
	* ipa.c (symtab_remove_unreachable_nodes): Do not clear local flag.
	(function_and_variable_visibility): Likewise.
	* trans-mem.c (ipa_tm_create_version): TM versions are not local.
Index: cgraph.c
===================================================================
*** cgraph.c	(revision 201483)
--- cgraph.c	(working copy)
*************** verify_cgraph_node (struct cgraph_node *
*** 2363,2369 ****
        error ("inline clone in same comdat group list");
        error_found = true;
      }
!   if (!node->symbol.definition && node->local.local)
      {
        error ("local symbols must be defined");
        error_found = true;
--- 2363,2369 ----
        error ("inline clone in same comdat group list");
        error_found = true;
      }
!   if (!node->symbol.definition && !node->symbol.in_other_partition && node->local.local)
      {
        error ("local symbols must be defined");
        error_found = true;
Index: ipa.c
===================================================================
*** ipa.c	(revision 201483)
--- ipa.c	(working copy)
*************** symtab_remove_unreachable_nodes (bool be
*** 376,382 ****
  	    {
  	      if (file)
  		fprintf (file, " %s", cgraph_node_name (node));
! 	      cgraph_reset_node (node);
  	      changed = true;
  	    }
  	}
--- 376,390 ----
  	    {
  	      if (file)
  		fprintf (file, " %s", cgraph_node_name (node));
! 	      node->symbol.analyzed = false;
! 	      node->symbol.definition = false;
! 	      node->symbol.cpp_implicit_alias = false;
! 	      node->symbol.alias = false;
! 	      node->symbol.weakref = false;
! 	      if (!node->symbol.in_other_partition)
! 		node->local.local = false;
! 	      cgraph_node_remove_callees (node);
! 	      ipa_remove_all_references (&node->symbol.ref_list);
  	      changed = true;
  	    }
  	}
*************** function_and_variable_visibility (bool w
*** 888,894 ****
      }
    FOR_EACH_DEFINED_FUNCTION (node)
      {
!       node->local.local = cgraph_local_node_p (node);
  
        /* If we know that function can not be overwritten by a different semantics
  	 and moreover its section can not be discarded, replace all direct calls
--- 896,902 ----
      }
    FOR_EACH_DEFINED_FUNCTION (node)
      {
!       node->local.local |= cgraph_local_node_p (node);
  
        /* If we know that function can not be overwritten by a different semantics
  	 and moreover its section can not be discarded, replace all direct calls
Index: trans-mem.c
===================================================================
*** trans-mem.c	(revision 201483)
--- trans-mem.c	(working copy)
*************** ipa_tm_create_version (struct cgraph_nod
*** 4774,4779 ****
--- 4774,4780 ----
      DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
  
    new_node = cgraph_copy_node_for_versioning (old_node, new_decl, vNULL, NULL);
+   new_node->local.local = false;
    new_node->symbol.externally_visible = old_node->symbol.externally_visible;
    new_node->lowered = true;
    new_node->tm_clone = 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-05 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-05 15:00 Fix wrong code issues on x86 and LTO Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).