public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/21883] New: tree-ssa-dom.c causing excessive code duplication Date: Thu, 02 Jun 2005 18:55:00 -0000 [thread overview] Message-ID: <20050602185512.21883.jakub@gcc.gnu.org> (raw) extern int foo1 (void), foo2 (int); int bar (int x) { int varvar1, varvar2; int z; if (x > 913) varvar1 = foo1 (); else varvar2 = foo2 (6); #define A foo1 (); foo1 (); foo1 (); foo1 (); foo1 (); #define B A A A A A A A A A A #define C B B B B B B B B B B C C C C C C C C C C C if (x > 913) z = varvar1 + foo1 (); else z = varvar2 + foo2 (6); return z; } Current HEAD will duplicate all the 2500 foo1 () calls to save a if (x > 913) comparison. With -Os almost no duplication should be allowed (only if the duplicated instructions are expected to be shorter than the compare and branch), and even with -O2 there should be some sensible limit. -- Summary: tree-ssa-dom.c causing excessive code duplication Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21883
next reply other threads:[~2005-06-02 18:55 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-06-02 18:55 jakub at gcc dot gnu dot org [this message] 2005-06-02 19:04 ` [Bug tree-optimization/21883] [4.1 Regression] jump threading " pinskia at gcc dot gnu dot org 2005-07-12 6:43 ` pinskia at gcc dot gnu dot org 2005-09-01 11:23 ` steven at gcc dot gnu dot org 2005-09-01 11:37 ` steven 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=20050602185512.21883.jakub@gcc.gnu.org \ --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).