This is the mail archive of the gcc-cvs@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]

gcc/gcc tree-simple.c tree-simple.h c-pretty-p ...


CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	ast-optimizer-branch
Changes by:	jason@gcc.gnu.org	2002-06-20 14:52:55

Modified files:
	gcc            : tree-simple.c tree-simple.h c-pretty-print.c 
	                 c-simplify.c ChangeLog 

Log message:
	Simplify DECL_STMT, CONSTRUCTOR and COMPOUND_LITERAL_EXPR.
	* tree-simple.c (is_simple_decl_stmt): New fn.
	(is_simple_constructor, is_simple_constructor_elt): New fns.
	(is_simple_stmt, is_simple_unary_expr): Use them.
	(is_simple_modify_expr): Accept an INIT_EXPR.
	(is_simple_id): Don't allow a COMPOUND_LITERAL_EXPR.
	(is_simple_unary_expr): Here either.
	* c-simplify.c (simplify_decl_stmt, simplify_constructor): New fns.
	(simplify_compound_literal_expr): New fn.
	(simplify_stmt, simplify_expr): Use them.
	(get_initialized_tmp_var): Use an INIT_EXPR.
	(simplify_modify_expr): Accept an INIT_EXPR.
	(simplify_for_stmt): Call simplify_decl_stmt.
	(get_name): Don't crash if the decl is anonymous.
	(tail_expression): New fn.
	* tree-simple.h: Declare new fns.
	* c-pretty-print.c (dump_c_node) [INIT_EXPR]: Print like MODIFY_EXPR.
	(dump_c_node, op_prio): Handle COMPOUND_LITERAL_EXPR.
	* c-simplify.c (simplify_expr_wfl): Only wrap pre and post stuff
	that came from our subexpression.
	(simplify_stmt): Restore stmts_are_full_exprs_p.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-simple.c.diff?cvsroot=gcc&only_with_tag=ast-optimizer-branch&r1=1.1.2.19&r2=1.1.2.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-simple.h.diff?cvsroot=gcc&only_with_tag=ast-optimizer-branch&r1=1.1.2.15&r2=1.1.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-pretty-print.c.diff?cvsroot=gcc&only_with_tag=ast-optimizer-branch&r1=1.1.2.22&r2=1.1.2.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-simplify.c.diff?cvsroot=gcc&only_with_tag=ast-optimizer-branch&r1=1.1.2.43&r2=1.1.2.44
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=ast-optimizer-branch&r1=1.10739.2.95&r2=1.10739.2.96


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