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

Jason Merrill jason@redhat.com
Fri Oct 4 04:20:00 GMT 2002


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gimplify.patch.bz2
Type: application/x-bzip2
Size: 19271 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20021004/32801322/attachment.bz2>


More information about the Gcc-patches mailing list