From d406b663d0e9973eeb9211409fe35d70b973db34 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Wed, 9 Jul 2008 21:32:54 +0200
Subject: gimplify.c (struct gimplify_ctx): Move to tree-gimple.h.

	* gimplify.c (struct gimplify_ctx): Move to tree-gimple.h.
	(push_gimplify_context): Don't allocate temp_htab nor c itself here.
	Add c argument.
	(pop_gimplify_context): Check c->temp_htab instead of optimize whether
	htab_delete should be called.  Don't free c.
	(lookup_tmp_var): Create temp_htab lazily.
	(gimplify_scan_omp_clauses, gimplify_omp_parallel, gimplify_omp_task,
	gimplify_body, force_gimple_operand): Adjust push_gimplify_context
	callers.
	* omp-low.c (lower_omp_sections, lower_omp_single, lower_omp_master,
	lower_omp_ordered, lower_omp_critical, lower_omp_for,
	create_task_copyfn, lower_omp_taskreg, execute_lower_omp):
	* tree-ssa-ccp.c (convert_to_gimple_builtin): Likewise.
	* tree-sra.c (generate_element_init): Likewise.
	* tree-mudflap.c (execute_mudflap_function_ops,
	execute_mudflap_function_decls): Likewise.
	* tree-inline.c (setup_one_parameter, optimize_inline_calls): Likewise.
	* tree-gimple.h (struct gimplify_ctx): New type.
	(push_gimplify_context): Adjust prototype.

From-SVN: r137666
---
 gcc/tree-mudflap.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'gcc/tree-mudflap.c')

diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index b5e8984a4df..46650b37dd4 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -421,13 +421,15 @@ mudflap_init (void)
 static unsigned int
 execute_mudflap_function_ops (void)
 {
+  struct gimplify_ctx gctx;
+
   /* Don't instrument functions such as the synthetic constructor
      built during mudflap_finish_file.  */
   if (mf_marked_p (current_function_decl) ||
       DECL_ARTIFICIAL (current_function_decl))
     return 0;
 
-  push_gimplify_context ();
+  push_gimplify_context (&gctx);
 
   /* In multithreaded mode, don't cache the lookup cache parameters.  */
   if (! flag_mudflap_threads)
@@ -958,13 +960,15 @@ mf_xform_derefs (void)
 static unsigned int
 execute_mudflap_function_decls (void)
 {
+  struct gimplify_ctx gctx;
+
   /* Don't instrument functions such as the synthetic constructor
      built during mudflap_finish_file.  */
   if (mf_marked_p (current_function_decl) ||
       DECL_ARTIFICIAL (current_function_decl))
     return 0;
 
-  push_gimplify_context ();
+  push_gimplify_context (&gctx);
 
   mf_xform_decls (DECL_SAVED_TREE (current_function_decl),
                   DECL_ARGUMENTS (current_function_decl));
-- 
cgit v1.2.1