public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/pheeck/heads/sccp)] lto: fix usage of timer in materialize_cgraph
@ 2023-02-15 10:24 Filip Kastl
  0 siblings, 0 replies; only message in thread
From: Filip Kastl @ 2023-02-15 10:24 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9c6cb815817611478b6e89fee3d5d9420ad6ae99

commit 9c6cb815817611478b6e89fee3d5d9420ad6ae99
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Nov 23 10:38:54 2022 +0100

    lto: fix usage of timer in materialize_cgraph
    
            PR lto/107829
    
    gcc/lto/ChangeLog:
    
            * lto.cc (materialize_cgraph): Call timevar_push before
              materialization starts.

Diff:
---
 gcc/lto/lto.cc | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/gcc/lto/lto.cc b/gcc/lto/lto.cc
index 3a9147b01b5..3265a1d07bc 100644
--- a/gcc/lto/lto.cc
+++ b/gcc/lto/lto.cc
@@ -137,6 +137,12 @@ materialize_cgraph (void)
     fprintf (stderr,
 	     flag_wpa ? "Materializing decls:" : "Reading function bodies:");
 
+  /* Start the appropriate timer depending on the mode that we are
+     operating in.  */
+  lto_timer = (flag_wpa) ? TV_WHOPR_WPA
+	      : (flag_ltrans) ? TV_WHOPR_LTRANS
+	      : TV_LTO;
+  timevar_push (lto_timer);
 
   FOR_EACH_FUNCTION (node)
     {
@@ -147,14 +153,6 @@ materialize_cgraph (void)
 	}
     }
 
-
-  /* Start the appropriate timer depending on the mode that we are
-     operating in.  */
-  lto_timer = (flag_wpa) ? TV_WHOPR_WPA
-	      : (flag_ltrans) ? TV_WHOPR_LTRANS
-	      : TV_LTO;
-  timevar_push (lto_timer);
-
   current_function_decl = NULL;
   set_cfun (NULL);

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

only message in thread, other threads:[~2023-02-15 10:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15 10:24 [gcc(refs/users/pheeck/heads/sccp)] lto: fix usage of timer in materialize_cgraph Filip Kastl

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