From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26753 invoked by alias); 14 Apr 2010 20:50:10 -0000 Received: (qmail 26582 invoked by uid 48); 14 Apr 2010 20:49:55 -0000 Date: Wed, 14 Apr 2010 20:50:00 -0000 Message-ID: <20100414204955.26581.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/42574] [4.3/4.4/4.5/4.6 Regression] Address of global variable is calculated multiple times (missed CSE) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "steven at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg01400.txt.bz2 ------- 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