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)] hubicka bug fix Date: Fri, 21 Apr 2023 15:35:02 +0000 (GMT) [thread overview] Message-ID: <20230421153502.4CE6C3858C50@sourceware.org> (raw) https://gcc.gnu.org/g:1525af68c65e3f184397d9943ca3dce60ad5e18e commit 1525af68c65e3f184397d9943ca3dce60ad5e18e Author: kubaneko <kubanek0ondrej@gmail.com> Date: Fri Apr 21 15:34:54 2023 +0000 hubicka bug fix Diff: --- gcc/tree-ssa-loop-ch.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index 6b332719411..e621011fe44 100644 --- a/gcc/tree-ssa-loop-ch.cc +++ b/gcc/tree-ssa-loop-ch.cc @@ -557,6 +557,17 @@ ch_base::copy_headers (function *fun) } } + /* Update header of the loop. */ + loop->header = header; + /* Find correct latch. We only duplicate chain of conditionals so + there should be precisely two edges to the new header. One entry + edge and one to latch. */ + FOR_EACH_EDGE (e, ei, loop->header->preds) + if (header != e->src) + { + loop->latch = e->src; + break; + } /* Ensure that the latch and the preheader is simple (we know that they are not now, since there was the loop exit condition. */ split_edge (loop_preheader_edge (loop)); @@ -583,6 +594,8 @@ ch_base::copy_headers (function *fun) if (changed) { + if (flag_checking) + verify_loop_structure (); update_ssa (TODO_update_ssa); /* After updating SSA form perform CSE on the loop header copies. This is esp. required for the pass before
reply other threads:[~2023-04-21 15:35 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=20230421153502.4CE6C3858C50@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).