public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ottoni@ic.unicamp.br
To: gcc-gnats@gcc.gnu.org
Subject: optimization/4919: gcse inhibits loop optimization
Date: Fri, 16 Nov 2001 23:39:00 -0000	[thread overview]
Message-ID: <20011121142018.3034.qmail@sourceware.cygnus.com> (raw)


>Number:         4919
>Category:       optimization
>Synopsis:       gcse inhibits loop optimization
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 21 06:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Guilherme Ottoni
>Release:        gcc version 3.1 20011029 (experimental)
>Organization:
>Environment:
RedHat Linux 6.2 running on a PC (K6-II)
>Description:
Compiling with gcc -O2 the source attached, the loop optimizer fails to detect 
BIVs, and so misses the opportunity to apply all the loop 
optimizations. If you add the -no-gcse flag to the command line,
the loop optimizer works properly.
To check what the loop optimizer is doing, I'm looking at 
the debug file generated by -dL.
>How-To-Repeat:
Simply compile the source attached, with -O2, and with and 
without the -fno-gcse. Then look at the .loop debug files to
check the problem.
I'm using a dsp16xx target, but I think this problem will occur 
with any target, as it is before the backend.
>Fix:
Maybe enhancing the BIV detection method to get the BIVs in 
these cases. Another (dirty) solution would be to inhibit the 
GCSE to optimize the code in the LOOP_CONT.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="cc2001.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cc2001.c"

bWFpbigpCnsKICBpbnQgIGksIGF2ZywgYVsxMDBdLCBlcnJvcjsKICBmb3IgKGk9MDsgaSA8IDkw
OyBpKyspCiAgewogICAgaWYgKGklMikKICAgIHsgCiAgICAgIGF2ZyArPSBhW2krMV0gPDwgMjsK
ICAgICAgYVtpKzJdID0gYXZnICogMzsKICAgIH0KICAgIGlmIChhdmcgPCBlcnJvcikKICAgICAg
YXZnIC09IGFbaSsxXSAtIGVycm9yLzI7CiAgICBlbHNlCiAgICAgIGF2ZyAtPSBhW2krMl0gLSBl
cnJvcjsKICB9Cn0KCg==


             reply	other threads:[~2001-11-21 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-16 23:39 ottoni [this message]
2001-11-21  3:36 rth
2001-11-21  3:43 rth

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=20011121142018.3034.qmail@sourceware.cygnus.com \
    --to=ottoni@ic.unicamp.br \
    --cc=gcc-gnats@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).