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]

[tree-ssa] patch to separate C and li gimplification


This patch begins the process of separating the language-independent
gimplifier from the C-specific one.  Mostly it's a cut-and-paste job, but
it also removes calls to frontend functions like pushdecl and
build_modify_expr.

I also moved the tree dumps into c_expand_body so the .t04.simple file
doesn't get two copies of each function.  Currently the .t03.original file
is simplified, too, but it is dumped before inlining, which can be an
interesting distinction.  I'll refine this later.

2002-10-03  Jason Merrill  <jason@redhat.com>

	* c-simplify.c (simplify_expr_stmt): Call set_file_and_line_for_stmt.
Fixes 20020220-2.c.

	* gimplify.c: New file.
	(push_gimplify_context, pop_gimplify_context): New fns.
	(gimple_push_bind_expr, gimple_pop_bind_expr): New fns.
	(simplify_bind_expr): Use them.
	(gimple_current_bind_expr, gimple_add_tmp_var): New fn.
	(foreach_stmt): Recurse if necessary.
	(various): Use generic interfaces instead of c-specific ones.
	* c-simplify.c: Move language-independent code to gimplify.c.
	(simplify_c_loop): Use add_tree instead of add_stmt_to_compound.
	(various): Use new *_bind_expr interfaces.
	* Makefile.in (C_AND_OBJC_OBJS): Add gimplify.o.
	(gimplify.o): New rule.

	* c-decl.c (c_expand_body): Dump trees here.
	* c-simplify.c (simplify_function_body): Not here.

Attachment: gimplify.patch.bz2
Description: BZip2 compressed data


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