From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8027 invoked by alias); 15 Aug 2007 18:32:09 -0000 Received: (qmail 7975 invoked by uid 22791); 15 Aug 2007 18:32:08 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Aug 2007 18:32:01 +0000 Received: (qmail 28463 invoked from network); 15 Aug 2007 18:31:59 -0000 Received: from unknown (HELO bullfrog.localdomain) (sandra@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Aug 2007 18:31:59 -0000 Message-ID: <46C34624.4070505@codesourcery.com> Date: Wed, 15 Aug 2007 18:32:00 -0000 From: Sandra Loosemore User-Agent: Thunderbird 2.0.0.5 (X11/20070716) MIME-Version: 1.0 To: Andrew Pinski CC: GCC Patches , Nigel Stephens , Guy Morrogh , David Ung , Thiemo Seufer , Richard Sandiford Subject: Re: PATCH: fine-tuning for can_store_by_pieces References: <46C3343A.5080407@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00952.txt.bz2 Andrew Pinski wrote: > On 8/15/07, Sandra Loosemore wrote: >> On MIPS we can get better code by having can_store_by_pieces differentiate >> between the cases where it's used for memset operations, and those where it's >> used to copy a string constant. This patch introduces new SET_RATIO and >> SET_BY_PIECES_P macros, with appropriate defaults to preserve the existing >> behavior. I checked other targets and made the ones that override the default >> STORE_BY_PIECES_P clone the same definition for SET_BY_PIECES_P. > > Are you sure that the cause of the real issue here is not really PR > 31150? I don't think so. Nigel originally developed this patch against gcc 3.4; I just verified that it still does something useful for current mainline. > I don't think copying string constants and memcpy/memset > should be different in terms of heuristics. > > It seems if you gave a testcase where this is profitable, it would be > better to judge this patch (and maybe a testcase for the testsuite > also). I'll see if I can come up with something specific, or perhaps Nigel has a test case. -Sandra