public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/50693] Loop optimization restricted by GOTOs
Date: Tue, 11 Oct 2011 14:51:00 -0000	[thread overview]
Message-ID: <bug-50693-4-S9cryeBSv1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50693-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50693

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-11 14:50:51 UTC ---
(In reply to comment #17)
> LLVM appears to be able to recognize memset of any value, not just zero.  And
> apparently performs control flow simplification before attempting to recognize
> the idiom, so it can expose the loop created by the convoluted GOTOs.

Well, GCC also performs lots of control flow simplifications, just the bb's
aren't merged here because that would mean the user label would be lost,
couldn't be used by the user debugging the code at all.

Vectorization restricts the cfg of the loop.  In successfully vectorized loops
it is unlikely user labels would be very helpful to the user, since multiple
iterations of the loop are performed together.

If we want to handle this obfuscated code, either we'd need to make debugging
experience worse for all loops (say at -O3), no matter if they will be
successfully vectorized or not, or lift up the restrictions in the vectorizer,
so that it would accept multiple basic blocks with only fallthru edges in
between and no phis or something similar, or temporarily merge the block and
split it again after vectorization, readding the user labels.


  parent reply	other threads:[~2011-10-11 14:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 22:45 [Bug c/50693] New: Slightly different loop body leads to 5.5x slower performance alex.gaynor at gmail dot com
2011-10-10 22:52 ` [Bug c/50693] " alex.gaynor at gmail dot com
2011-10-10 22:54 ` [Bug tree-optimization/50693] Slightly different loop body leads not vectoring loop pinskia at gcc dot gnu.org
2011-10-10 22:55 ` pinskia at gcc dot gnu.org
2011-10-10 23:57 ` dje at gcc dot gnu.org
2011-10-11  0:04 ` dje at gcc dot gnu.org
2011-10-11  0:22 ` dje at gcc dot gnu.org
2011-10-11  0:23 ` pinskia at gcc dot gnu.org
2011-10-11  1:12 ` [Bug tree-optimization/50693] Loop optimization restricted by GOTOs dje at gcc dot gnu.org
2011-10-11  1:24 ` pinskia at gcc dot gnu.org
2011-10-11  1:35 ` dje at gcc dot gnu.org
2011-10-11  7:15 ` irar at il dot ibm.com
2011-10-11 14:07 ` dje at gcc dot gnu.org
2011-10-11 14:13 ` rguenth at gcc dot gnu.org
2011-10-11 14:15 ` paolo.carlini at oracle dot com
2011-10-11 14:35 ` rguenth at gcc dot gnu.org
2011-10-11 14:36 ` rguenth at gcc dot gnu.org
2011-10-11 14:40 ` dje at gcc dot gnu.org
2011-10-11 14:44 ` rguenth at gcc dot gnu.org
2011-10-11 14:46 ` rguenth at gcc dot gnu.org
2011-10-11 14:51 ` jakub at gcc dot gnu.org [this message]
2011-10-11 16:04 ` alex.gaynor at gmail dot com
2011-10-12 15:21 ` rguenth at gcc dot gnu.org
2011-10-25  4:48 ` aoliva at gcc dot gnu.org
2011-11-04 17:18 ` jakub at gcc dot gnu.org
2011-11-05 19:59 ` jakub at gcc dot gnu.org
2011-11-05 20:09 ` alex.gaynor at gmail dot com
2012-03-26 10:35 ` jakub 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-50693-4-S9cryeBSv1@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).