[Bug target/11787] always call memcpy for block move in mips16

sandra at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Aug 24 23:54:00 GMT 2007



------- Comment #5 from sandra at gcc dot gnu dot org  2007-08-24 23:54 -------
Subject: Bug 11787

Author: sandra
Date: Fri Aug 24 23:54:05 2007
New Revision: 127790

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127790
Log:
2007-08-24  Sandra Loosemore  <sandra@codesourcery.com>
            Nigel Stephens <nigel@mips.com>

        PR target/11787

        gcc/

        * doc/tm.texi (SET_RATIO, SET_BY_PIECES_P): Document new macros.
        (STORE_BY_PIECES_P): No longer applies to __builtin_memset.
        * expr.c (SET_BY_PIECES_P): Define.
        (can_store_by_pieces, store_by_pieces): Add MEMSETP argument; use
        it to decide whether to use SET_BY_PIECES_P or STORE_BY_PIECES_P.
        (store_expr):  Pass MEMSETP argument to can_store_by_pieces and
        store_by_pieces.
        * expr.h (SET_RATIO): Define.
        (can_store_by_pieces, store_by_pieces): Update prototypes.
        * builtins.c (expand_builtin_memcpy): Pass MEMSETP argument to
        can_store_by_pieces/store_by_pieces.
        (expand_builtin_memcpy_args): Likewise.
        (expand_builtin_strncpy): Likewise.
        (expand_builtin_memset_args): Likewise.  Also remove special case
        for optimize_size so that can_store_by_pieces/SET_BY_PIECES_P can
        decide what to do instead.
        * value-prof.c (tree_stringops_transform): Pass MEMSETP argument
        to can_store_by_pieces.

        * config/sh/sh.h (SET_BY_PIECES_P): Clone from STORE_BY_PIECES_P.
        * config/s390/s390.h (SET_BY_PIECES_P): Likewise.

        * config/mips/mips.opt (mmemcpy): Change from Var to Mask.
        * config/mips/mips.c (override_options): Make -Os default to -mmemcpy.
        * config/mips/mips.h (MIPS_CALL_RATIO): Define.
        (MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Define.
        (STORE_BY_PIECES_P): Define.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/config/mips/mips.c
    trunk/gcc/config/mips/mips.h
    trunk/gcc/config/mips/mips.opt
    trunk/gcc/config/s390/s390.h
    trunk/gcc/config/sh/sh.h
    trunk/gcc/doc/tm.texi
    trunk/gcc/expr.c
    trunk/gcc/expr.h
    trunk/gcc/value-prof.c


-- 


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



More information about the Gcc-bugs mailing list