This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: fine-tuning for can_store_by_pieces


Andrew Pinski wrote:
On 8/15/07, Sandra Loosemore <sandra@codesourcery.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]