public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Ondrej Kubanek <kubaneko@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/kubaneko/heads/histogram)] add loop_optimizer_init Date: Thu, 23 Feb 2023 23:21:37 +0000 (GMT) [thread overview] Message-ID: <20230223232137.08410385B50C@sourceware.org> (raw) https://gcc.gnu.org/g:158017f839421c3b8b337fa400224bb0c3f3db02 commit 158017f839421c3b8b337fa400224bb0c3f3db02 Author: kubaneko <kubanek0ondrej@gmail.com> Date: Tue Sep 27 12:47:59 2022 +0000 add loop_optimizer_init Diff: --- gcc/profile.cc | 5 +++++ gcc/value-prof.cc | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/profile.cc b/gcc/profile.cc index 9cab798f736..d571791f1a8 100644 --- a/gcc/profile.cc +++ b/gcc/profile.cc @@ -1206,6 +1206,9 @@ branch_prob (bool thunk) total_num_times_called++; + calculate_dominance_info (CDI_DOMINATORS); + loop_optimizer_init (LOOPS_HAVE_SIMPLE_LATCHES); + flow_call_edges_add (NULL); add_noreturn_fake_exit_edges (); @@ -1593,6 +1596,8 @@ branch_prob (bool thunk) } compute_function_frequency (); } + loop_optimizer_finalize (); + free_dominance_info (CDI_DOMINATORS); } \f /* Union find algorithm implementation for the basic blocks using diff --git a/gcc/value-prof.cc b/gcc/value-prof.cc index 1eca1b79173..3a1dbd90a07 100644 --- a/gcc/value-prof.cc +++ b/gcc/value-prof.cc @@ -1929,11 +1929,11 @@ gimple_stringops_values_to_profile (gimple *gs, histogram_values *values) static void gimple_histogram_values_to_profile(function *fun, histogram_values * values){ - calculate_dominance_info (CDI_DOMINATORS); for (auto loop : loops_list (fun, 0)){ tree var; gimple_stmt_iterator gsi; - gsi = gsi_last_bb (loop->latch); + + gsi = gsi_start_bb (loop->latch); create_iv (build_int_cst_type (get_gcov_type(), 0), build_int_cst (get_gcov_type(), 1), NULL_TREE, loop, &gsi, true, &var, NULL); auto_vec<edge> exits = get_loop_exit_edges (loop); @@ -1945,7 +1945,6 @@ gimple_histogram_values_to_profile(function *fun, histogram_values * values){ } } } - free_dominance_info (CDI_DOMINATORS); gsi_commit_edge_inserts (); }
next reply other threads:[~2023-02-23 23:21 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-23 23:21 Ondrej Kubanek [this message] -- strict thread matches above, loose matches on Subject: below -- 2023-02-16 16:27 Ondrej Kubanek 2022-09-28 15:31 Ondrej Kubanek
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230223232137.08410385B50C@sourceware.org \ --to=kubaneko@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).