public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/45178] CDDCE doesn't eliminate conditional code in infinite loop Date: Thu, 26 Aug 2021 12:02:05 +0000 [thread overview] Message-ID: <bug-45178-4-3S8ZVcMVUJ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-45178-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45178 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|TREE | Last reconfirmed|2021-07-26 00:00:00 |2021-8-26 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- So no, that's not the problem at all. The only loop is the infinite while (1) one, the problem is that because we cannot prove finiteness of the loop we're doing for (auto loop : loops_list (cfun, 0)) if (!finite_loop_p (loop)) { if (dump_file) fprintf (dump_file, "cannot prove finiteness of loop %i\n", loop->num); mark_control_dependent_edges_necessary (loop->latch, false); } and that marks a condition that has nothing to do with loop control. I suppose we can elide this when the loop has no exit (we are already marking backedges of irreducible loops). But I never actually understood this particular part of CD-DCE. The desired transform is that we end up with just int main() { while (1) ; }
next parent reply other threads:[~2021-08-26 12:02 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-45178-4@http.gcc.gnu.org/bugzilla/> 2021-08-26 12:02 ` rguenth at gcc dot gnu.org [this message] 2021-08-26 14:35 ` hubicka at ucw dot cz 2021-08-27 7:51 ` cvs-commit at gcc dot gnu.org 2021-08-27 7:52 ` rguenth at gcc dot gnu.org 2022-02-17 11:26 ` cvs-commit at gcc dot gnu.org 2010-08-04 9:46 [Bug tree-optimization/45178] New: " rguenth at gcc dot gnu dot org 2010-08-04 13:05 ` [Bug tree-optimization/45178] " hubicka at ucw dot cz 2010-08-04 13:21 ` rguenth at gcc dot gnu dot org
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=bug-45178-4-3S8ZVcMVUJ@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).