aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 9474167..4d32fb6 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1243,7 +1243,7 @@ static void
finalize_task_copyfn (gimple task_stmt)
{
struct function *child_cfun;
- tree child_fn, old_fn;
+ tree child_fn;
gimple_seq seq = NULL, new_seq;
gimple bind;
@@ -1257,9 +1257,7 @@ finalize_task_copyfn (gimple task_stmt)
DECL_STRUCT_FUNCTION (child_fn)->curr_properties
= cfun->curr_properties & ~PROP_loops;
- old_fn = current_function_decl;
push_cfun (child_cfun);
- current_function_decl = child_fn;
bind = gimplify_body (child_fn, false);
gimple_seq_add_stmt (&seq, bind);
new_seq = maybe_catch_exception (seq);
@@ -1271,7 +1269,6 @@ finalize_task_copyfn (gimple task_stmt)
}
gimple_set_body (child_fn, seq);
pop_cfun ();
- current_function_decl = old_fn;
cgraph_add_new_function (child_fn, false);
}
@@ -3388,7 +3385,6 @@ expand_omp_taskreg (struct omp_region *region)
basic_block entry_bb, exit_bb, new_bb;
struct function *child_cfun;
tree child_fn, block, t;
- tree save_current;
gimple_stmt_iterator gsi;
gimple entry_stmt, stmt;
edge e;
@@ -3588,8 +3584,6 @@ expand_omp_taskreg (struct omp_region *region)
/* Fix the callgraph edges for child_cfun. Those for cfun will be
fixed in a following pass. */
push_cfun (child_cfun);
- save_current = current_function_decl;
- current_function_decl = child_fn;
if (optimize)
optimize_omp_library_calls (entry_stmt);
rebuild_cgraph_edges ();
@@ -3610,7 +3604,6 @@ expand_omp_taskreg (struct omp_region *region)
}
if (gimple_in_ssa_p (cfun))
update_ssa (TODO_update_ssa);
- current_function_decl = save_current;
pop_cfun ();
}
@@ -6456,7 +6449,7 @@ create_task_copyfn (gimple task_stmt, omp_context *ctx)
/* Populate the function. */
push_gimplify_context (&gctx);
- current_function_decl = child_fn;
+ push_cfun (child_cfun);
bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL);
TREE_SIDE_EFFECTS (bind) = 1;
@@ -6503,8 +6496,6 @@ create_task_copyfn (gimple task_stmt, omp_context *ctx)
else
tcctx.cb.decl_map = NULL;
- push_cfun (child_cfun);
-
arg = DECL_ARGUMENTS (child_fn);
TREE_TYPE (arg) = build_pointer_type (record_type);
sarg = DECL_CHAIN (arg);
@@ -6662,7 +6653,6 @@ create_task_copyfn (gimple task_stmt, omp_context *ctx)
pop_gimplify_context (NULL);
BIND_EXPR_BODY (bind) = list;
pop_cfun ();
- current_function_decl = ctx->cb.src_fn;
}
/* Lower the OpenMP parallel or task directive in the current statement