public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102906] [12 regression] gcc.target/arm/ivopts-4.c fails since r12-4526 Date: Wed, 10 Nov 2021 22:13:50 +0000 [thread overview] Message-ID: <bug-102906-4-30SpwKUfVQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102906-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102906 --- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>: https://gcc.gnu.org/g:e82c382971664d6fd138cc36020db4b1a91885c6 commit r12-5138-ge82c382971664d6fd138cc36020db4b1a91885c6 Author: Aldy Hernandez <aldyh@redhat.com> Date: Wed Nov 10 13:21:59 2021 +0100 Allow loop header copying when first iteration condition is known. As discussed in the PR, the loop header copying pass avoids doing so when optimizing for size. However, sometimes we can determine the loop entry conditional statically for the first iteration of the loop. This patch uses the path solver to determine the outgoing edge out of preheader->header->xx. If so, it allows header copying. Doing this in the loop optimizer saves us from doing gymnastics in the threader which doesn't have the context to determine if a loop transformation is profitable. I am only returning true in entry_loop_condition_is_static for a true conditional. Technically a false conditional is also provably static, but allowing any boolean value causes a regression in gfortran.dg/vector_subscript_1.f90. I would have preferred not passing around the query object, but the layout of pass_ch and should_duplicate_loop_header_p make it a bit awkward to get it right without an outright refactor to the pass. Tested on x86-64 Linux. gcc/ChangeLog: PR tree-optimization/102906 * tree-ssa-loop-ch.c (entry_loop_condition_is_static): New. (should_duplicate_loop_header_p): Call entry_loop_condition_is_static. (class ch_base): Add m_ranger and m_query. (ch_base::copy_headers): Pass m_query to entry_loop_condition_is_static. (pass_ch::execute): Allocate and deallocate m_ranger and m_query. (pass_ch_vect::execute): Same. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr102906.c: New test.
next prev parent reply other threads:[~2021-11-10 22:13 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-22 23:09 [Bug middle-end/102906] New: " clyon at gcc dot gnu.org 2021-10-25 6:44 ` [Bug middle-end/102906] " rguenth at gcc dot gnu.org 2021-10-30 17:51 ` aldyh at gcc dot gnu.org 2021-11-01 20:09 ` clyon at gcc dot gnu.org 2021-11-06 18:20 ` aldyh at redhat dot com 2021-11-07 10:36 ` clyon at gcc dot gnu.org 2021-11-08 7:12 ` aldyh at gcc dot gnu.org 2021-11-08 7:52 ` clyon at gcc dot gnu.org 2021-11-08 8:19 ` [Bug testsuite/102906] " aldyh at gcc dot gnu.org 2021-11-08 8:41 ` aldyh at gcc dot gnu.org 2021-11-08 17:53 ` clyon at gcc dot gnu.org 2021-11-08 18:20 ` aldyh at gcc dot gnu.org 2021-11-09 8:15 ` [Bug tree-optimization/102906] " rguenth at gcc dot gnu.org 2021-11-10 9:15 ` aldyh at gcc dot gnu.org 2021-11-10 9:18 ` rguenther at suse dot de 2021-11-10 9:53 ` aldyh at gcc dot gnu.org 2021-11-10 9:57 ` rguenther at suse dot de 2021-11-10 10:07 ` aldyh at gcc dot gnu.org 2021-11-10 10:13 ` rguenther at suse dot de 2021-11-10 10:20 ` aldyh at redhat dot com 2021-11-10 12:59 ` aldyh at gcc dot gnu.org 2021-11-10 22:13 ` cvs-commit at gcc dot gnu.org [this message] 2021-11-11 6:19 ` aldyh at gcc dot gnu.org 2021-11-14 10:39 ` aldyh at gcc dot gnu.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-102906-4-30SpwKUfVQ@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).