public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/42574] [4.3/4.4/4.5/4.6 Regression] Address of global variable is calculated multiple times (missed CSE)
Date: Wed, 14 Apr 2010 20:50:00 -0000	[thread overview]
Message-ID: <20100414204955.26581.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42574-17572@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from steven at gcc dot gnu dot org  2010-04-14 20:49 -------
Created an attachment (id=20379)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20379&action=view)
Classic GCSE, resurrected (with some improvements)

Updated patch for trunk r158281.

Bootstrapped and tested on ia64-unknown-linux-gnu (with this new old pass
enabled at -O2 or higher with an incremental patch).

Also tested the effect on size using CSiBE with various different options.
Baseline options are "-Os -mcpu=arm7tdmi -fno-short-enums", other options are
"-fpic", "-mthumb", and "-fpic -mthumb":

                     trunk   patched  diff    ratio
baseline             3542232 3537080  5152    99.8546
baseline+fpic        3792475 3782747  9728    99.7435
baseline+mthumb      2693008 2690942  2066    99.9233
baseline+fpic+mthumb 2840739 2836169  4570    99.8391

So in all cases there is a code size reduction, but it's not very much. All in
all I'm not sure if it's worth the cost.

I'm also still working on integrating this with the hoisting pass. That would
make this pass easier to justify (it'd be almost free, HOIST already computes
everything).


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19446|0                           |1
        is obsolete|                            |


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


  parent reply	other threads:[~2010-04-14 20:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-01 17:28 [Bug middle-end/42574] New: Address of global variable is calculated multiple times; CSE doesn't work properly sliao at google dot com
2010-01-01 20:16 ` [Bug middle-end/42574] " steven at gcc dot gnu dot org
2010-01-01 20:35 ` [Bug middle-end/42574] [4.3/4.4/4.5 Regression] Address of global variable is calculated multiple times (missed CSE) steven at gcc dot gnu dot org
2010-01-01 20:36 ` rguenth at gcc dot gnu dot org
2010-01-01 20:39 ` rguenth at gcc dot gnu dot org
2010-01-01 20:44 ` steven at gcc dot gnu dot org
2010-01-01 21:00 ` steven at gcc dot gnu dot org
2010-01-02  0:12 ` steven at gcc dot gnu dot org
2010-01-02 14:08 ` steven at gcc dot gnu dot org
2010-01-02 14:08 ` steven at gcc dot gnu dot org
2010-01-02 14:10 ` steven at gcc dot gnu dot org
2010-01-02 16:17 ` rguenth at gcc dot gnu dot org
2010-02-08 12:15 ` steven at gcc dot gnu dot org
2010-04-14 20:50 ` steven at gcc dot gnu dot org [this message]
2010-05-22 18:34 ` [Bug middle-end/42574] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
2010-06-08 15:24 ` mkuvyrkov at gcc dot gnu dot org
2010-07-27 19:35 ` mkuvyrkov at gcc dot gnu dot org
2010-07-27 19:38 ` mkuvyrkov at gcc dot gnu dot org
2010-07-27 19:42 ` mkuvyrkov at gcc dot gnu dot org
2010-07-27 19:45 ` mkuvyrkov at gcc dot gnu dot org
2010-07-27 19:48 ` mkuvyrkov at gcc dot gnu dot org
2010-07-27 21:07 ` mkuvyrkov at gcc dot gnu dot org
2010-07-27 21:11 ` mkuvyrkov 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=20100414204955.26581.qmail@sourceware.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: 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).