public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Move late_global_decl call
@ 2015-08-20 11:16 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2015-08-20 11:16 UTC (permalink / raw)
  To: gcc-patches


This moves it where it really belongs, also avoiding extra work for
the slim LTO compile phase.

Bootstrapped and tested and gdb tested on x86_64-unknown-linux-gnu, 
applied.

Richard.

2015-08-20  Richard Biener  <rguenther@suse.de>

	* toplev.c (compile_file): Remove loop calling late_global_decl
	on all symbols.
	* varpool.c (varpool_node::assemble_decl): Call late_global_decl
	on decls we assembled.

Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c	(revision 226966)
+++ gcc/toplev.c	(working copy)
@@ -580,15 +580,6 @@ compile_file (void)
   if (seen_error ())
     return;
 
-  /* After the parser has generated debugging information, augment
-     this information with any new location/etc information that may
-     have become available after the compilation proper.  */
-  timevar_start (TV_PHASE_DBGINFO);
-  symtab_node *node;
-  FOR_EACH_DEFINED_SYMBOL (node)
-    debug_hooks->late_global_decl (node->decl);
-  timevar_stop (TV_PHASE_DBGINFO);
-
   timevar_start (TV_PHASE_LATE_ASM);
 
   /* Compilation unit is finalized.  When producing non-fat LTO object, we are
Index: gcc/varpool.c
===================================================================
--- gcc/varpool.c	(revision 226966)
+++ gcc/varpool.c	(working copy)
@@ -586,6 +586,12 @@ varpool_node::assemble_decl (void)
       gcc_assert (TREE_ASM_WRITTEN (decl));
       gcc_assert (definition);
       assemble_aliases ();
+      /* After the parser has generated debugging information, augment
+	 this information with any new location/etc information that may
+	 have become available after the compilation proper.  */
+      timevar_start (TV_PHASE_DBGINFO);
+      debug_hooks->late_global_decl (decl);
+      timevar_stop (TV_PHASE_DBGINFO);
       return true;
     }
 

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

only message in thread, other threads:[~2015-08-20 11:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20 11:16 [PATCH] Move late_global_decl call Richard Biener

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).