From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2226 invoked by alias); 19 May 2010 10:14:06 -0000 Received: (qmail 2145 invoked by uid 48); 19 May 2010 10:13:44 -0000 Date: Wed, 19 May 2010 10:14:00 -0000 Message-ID: <20100519101344.2144.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/44194] struct returned by value generates useless stores In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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-05/txt/msg01992.txt.bz2 ------- Comment #2 from jakub at gcc dot gnu dot org 2010-05-19 10:13 ------- RTL DSE doesn't handle this because the call to bar, which isn't a const function, is considered a wild read and thus makes all stores necessary in the global as well as local algorithm. RTL DSE doesn't consider whether a frame based address could have possibly address taken or not and whether a call thus might read it or not. For tail calls before reload, perhaps we could handle tail calls similarly to const calls (be a read of all argument stores) with the addition that it would act as a read for all constant address stores (basically wild read for anything but frame based stores for the global algorithm, given that the stack is unwound before the tail call). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44194