egcs/gcc ChangeLog expr.h expr.c builtins.c te ...

jakub@gcc.gnu.org jakub@gcc.gnu.org
Wed Nov 29 10:24:00 GMT 2000


CVSROOT:	/cvs/gcc
Module name:	egcs
Changes by:	jakub@gcc.gnu.org	2000-11-29 10:24:51

Modified files:
	gcc            : ChangeLog expr.h expr.c builtins.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gcc.c-torture/execute: string-opt-5.c 
Added files:
	gcc/testsuite/gcc.c-torture/execute: string-opt-6.c 

Log message:
	* expr.h (store_by_pieces): Add prototype.
	(can_store_by_pieces): Likewise.
	* expr.c (struct store_by_pieces): Renamed from clear_by_pieces.
	(can_store_by_pieces): New.
	(store_by_pieces): New.
	(clear_by_pieces): New.
	(clear_by_pieces_1): New.
	(store_by_pieces_1): Renamed from clear_by_pieces, handle storing
	arbitrary compiler generated constants into memory block.
	(store_by_pieces_2): Renamed from clear_by_pieces_1, likewise.
	* builtins.c (c_readstr): New.
	(builtin_memcpy_read_str): New.
	(expand_builtin_memcpy): If src is string constant and
	emit_block_move would move it by pieces, compute integer constants
	from the string and store it into memory block instead.
	(builtin_strncpy_read_str): New.
	(expand_builtin_strncpy): If N is not constant zero and c_strlen does
	not return INTEGER_CST, don't optimize.
	If N is larger than strlen(src) + 1, try to copy the string
	including padding with store_by_pieces.
	(expand_builtin_strcmp): If both arguments have side effects, don't
	optimize.
	(expand_builtin_fputs): If STR has side effects, don't optimize.
	
	* gcc.c-torture/execute/string-opt-5.c: Add some strcmp and strncpy
	tests.
	* gcc.c-torture/execute/string-opt-6.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.8436&r2=1.8437
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/expr.h.diff?cvsroot=gcc&r1=1.71&r2=1.72
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/expr.c.diff?cvsroot=gcc&r1=1.278&r2=1.279
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/builtins.c.diff?cvsroot=gcc&r1=1.72&r2=1.73
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.880&r2=1.881
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/gcc.c-torture/execute/string-opt-5.c.diff?cvsroot=gcc&r1=1.1&r2=1.2



More information about the Gcc-cvs mailing list