public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/65658] New: Jump threading too pessimistic when optimizing for size Date: Thu, 02 Apr 2015 03:05:00 -0000 [thread overview] Message-ID: <bug-65658-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65658 Bug ID: 65658 Summary: Jump threading too pessimistic when optimizing for size Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: law at redhat dot com Created attachment 35209 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35209&action=edit testcase, compile with -O2 -Wall note uninitialized warnings for SRA's variables and trivially threadable block in setup() The jump threader will cancel jump threads when optimizing for size and the block will need to be duplicated. But that heuristic fails for something a block like this: # _36 = PHI <1(2), 1(4), 0(7)> # problem$l3_101 = PHI <problem$l3_8(D)(2), problem$l3_8(D)(4), problem$l3_35(7)> # problem$l4_100 = PHI <problem$l4_124(D)(2), problem$l4_124(D)(4), problem$l4_34(7)> amt ={v} {CLOBBER}; if (_36 != 0) goto <bb 25>; else goto <bb 9>; All incoming edges are threadable and the block produces no code. It's really just a redirection block that's not recognized as such -- probably due to the clobber statement. The net result is we cancel the jump thread, get worse code and issue false positive warnings for uninitialized variables. All around a lose.
next reply other threads:[~2015-04-02 3:05 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-02 3:05 law at redhat dot com [this message] 2015-04-02 8:44 ` [Bug tree-optimization/65658] " rguenth at gcc dot gnu.org 2015-04-20 17:14 ` law at gcc dot gnu.org 2015-04-20 19:36 ` law at gcc dot gnu.org 2015-04-20 19:37 ` law at redhat dot com
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-65658-4@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).