public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] lto: fix usage of timer in materialize_cgraph
@ 2022-11-23  9:40 Martin Liška
  2022-11-25  9:48 ` Martin Liška
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2022-11-23  9:40 UTC (permalink / raw)
  To: gcc-patches; +Cc: Martin Jambor

Pretty obvious change.

Ready to be installed?
Thanks,
Martin

	PR lto/107829

gcc/lto/ChangeLog:

	* lto.cc (materialize_cgraph): Call timevar_push before
	materialization starts.
---
 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);
 
-- 
2.38.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-25  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23  9:40 [PATCH] lto: fix usage of timer in materialize_cgraph Martin Liška
2022-11-25  9:48 ` Martin Liška

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