diff options
author | Martin Liska <mliska@suse.cz> | 2022-11-23 10:38:54 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-11-25 10:47:32 +0100 |
commit | 2b3a3d7fe3420b6b49810b2a7f5d120c53310335 (patch) | |
tree | 39482f4ebfc78b07519158d9108ff3c4bcf4656a /gcc/lto | |
parent | bcc2449384f2092cbdf5d6ac2357aeabe3212b2e (diff) | |
download | gcc-2b3a3d7fe3420b6b49810b2a7f5d120c53310335.zip gcc-2b3a3d7fe3420b6b49810b2a7f5d120c53310335.tar.gz gcc-2b3a3d7fe3420b6b49810b2a7f5d120c53310335.tar.bz2 |
lto: fix usage of timer in materialize_cgraph
PR lto/107829
gcc/lto/ChangeLog:
* lto.cc (materialize_cgraph): Call timevar_push before
materialization starts.
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/lto.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/lto/lto.cc b/gcc/lto/lto.cc index 3a9147b..3265a1d 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); |