public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-84] middle-end/105083 - check prerequesites in scev_initialize Date: Tue, 3 May 2022 12:15:12 +0000 (GMT) [thread overview] Message-ID: <20220503121512.7191A3856DC1@sourceware.org> (raw) https://gcc.gnu.org/g:7bb6fa5a1c77ef6af26c70e3126a8b1353d1f987 commit r13-84-g7bb6fa5a1c77ef6af26c70e3126a8b1353d1f987 Author: Richard Biener <rguenther@suse.de> Date: Tue May 3 12:48:43 2022 +0200 middle-end/105083 - check prerequesites in scev_initialize 2022-05-03 Richard Biener <rguenther@suse.de> PR middle-end/105083 * tree-scalar-evolution.cc (scev_initialize): Verify we have appropriate loop state. * tree-ssa-dce.cc (perform_tree_ssa_dce): Re-order SCEV and loop init and finalization. Diff: --- gcc/tree-scalar-evolution.cc | 3 ++- gcc/tree-ssa-dce.cc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/tree-scalar-evolution.cc b/gcc/tree-scalar-evolution.cc index b53d7aaa71d..72ceb4001e3 100644 --- a/gcc/tree-scalar-evolution.cc +++ b/gcc/tree-scalar-evolution.cc @@ -2977,7 +2977,8 @@ gather_stats_on_scev_database (void) void scev_initialize (void) { - gcc_assert (! scev_initialized_p ()); + gcc_assert (! scev_initialized_p () + && loops_state_satisfies_p (cfun, LOOPS_NORMAL)); scalar_evolution_info = hash_table<scev_info_hasher>::create_ggc (100); diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc index 2067b711d5b..a6b284018d4 100644 --- a/gcc/tree-ssa-dce.cc +++ b/gcc/tree-ssa-dce.cc @@ -1866,9 +1866,9 @@ perform_tree_ssa_dce (bool aggressive) bool in_loop_pipeline = scev_initialized_p (); if (aggressive && ! in_loop_pipeline) { - scev_initialize (); loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS); + scev_initialize (); } if (aggressive) @@ -1895,8 +1895,8 @@ perform_tree_ssa_dce (bool aggressive) if (aggressive && ! in_loop_pipeline) { - loop_optimizer_finalize (); scev_finalize (); + loop_optimizer_finalize (); } longest_chain = 0;
reply other threads:[~2022-05-03 12:15 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220503121512.7191A3856DC1@sourceware.org \ --to=rguenth@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).