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/59967] [4.8/4.9/5 Regression] Performance regression from 4.7.x to 4.8.x (loop not unrolled)
Date: Thu, 15 Jan 2015 14:44:00 -0000	[thread overview]
Message-ID: <bug-59967-4-DJWHsKdbsC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59967-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59967

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
In the size estimation we have

 BB: 46, after_exit: 0
  size:   1 _319 = MEM[(double *)c0_188(D) + 16B];
  size:   1 _321 = i_171 >> 2;
   Constant expression will be folded away.
  size:   2 if (_321 != 0)

so somehow we fail to see that the conditional is constant after peeling.

Reworking things so we can use a lattice (also avoid calling simple_iv
too many times) will improve that (but also the code doesn't then
only consider MAX (taken-paths-lengths) in case there is an else block).
It looks like reworking this to do a domwalk may be profitable.

The simplistic approach gets us from an estimated size after unrolling
of to 238 (still that won't unroll the loop).  I think we should also
consider size->eliminated_by_peeling in the call heuristic - the
call itself might be a minor distraction and especially eliminated
branches might result in a good speed benefit.

That said, the core algorithm for likely-eliminated should be improved,
but it won't help by itself.


  parent reply	other threads:[~2015-01-15 14:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 13:12 [Bug c/59967] New: " chbreitkopf at gmail dot com
2014-01-29 13:49 ` [Bug tree-optimization/59967] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-04-02 23:17 ` hubicka at ucw dot cz
2014-04-03  6:18 ` chbreitkopf at gmail dot com
2014-05-22  9:01 ` [Bug tree-optimization/59967] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:40 ` [Bug tree-optimization/59967] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-01-15 14:44 ` rguenth at gcc dot gnu.org
2015-01-15 14:44 ` rguenth at gcc dot gnu.org [this message]
2015-03-18 13:17 ` rguenth at gcc dot gnu.org
2015-06-23  8:23 ` [Bug tree-optimization/59967] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:13 ` [Bug tree-optimization/59967] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:36 ` jakub at gcc dot gnu.org
2015-06-30 11:02 ` rguenth at gcc dot gnu.org
2021-05-14  9:47 ` [Bug tree-optimization/59967] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:06 ` rguenth at gcc dot gnu.org
2022-05-27  9:35 ` [Bug tree-optimization/59967] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-07-07 10:30 ` [Bug tree-optimization/59967] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-11  6:18 ` pinskia 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-59967-4-DJWHsKdbsC@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: link
Be 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).