aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-10-27 08:47:25 -0700
committerIan Lance Taylor <iant@golang.org>2021-10-27 08:47:25 -0700
commita6d3012b274f38b20e2a57162106f625746af6c6 (patch)
tree09ff8b13eb8ff7594c27dc8812efbf696dc97484 /gcc/omp-low.c
parentcd2fd5facb5e1882d3f338ed456ae9536f7c0593 (diff)
parent99b1021d21e5812ed01221d8fca8e8a32488a934 (diff)
downloadgcc-a6d3012b274f38b20e2a57162106f625746af6c6.zip
gcc-a6d3012b274f38b20e2a57162106f625746af6c6.tar.gz
gcc-a6d3012b274f38b20e2a57162106f625746af6c6.tar.bz2
Merge from trunk revision 99b1021d21e5812ed01221d8fca8e8a32488a934.
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index f7242df..15e4424 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -591,7 +591,15 @@ omp_copy_decl_2 (tree var, tree name, tree type, omp_context *ctx)
tree copy = copy_var_decl (var, name, type);
DECL_CONTEXT (copy) = current_function_decl;
- DECL_CHAIN (copy) = ctx->block_vars;
+
+ if (ctx)
+ {
+ DECL_CHAIN (copy) = ctx->block_vars;
+ ctx->block_vars = copy;
+ }
+ else
+ record_vars (copy);
+
/* If VAR is listed in task_shared_vars, it means it wasn't
originally addressable and is just because task needs to take
it's address. But we don't need to take address of privatizations
@@ -602,7 +610,6 @@ omp_copy_decl_2 (tree var, tree name, tree type, omp_context *ctx)
|| (global_nonaddressable_vars
&& bitmap_bit_p (global_nonaddressable_vars, DECL_UID (var)))))
TREE_ADDRESSABLE (copy) = 0;
- ctx->block_vars = copy;
return copy;
}
@@ -1281,7 +1288,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
tree at = t;
if (ctx->outer)
scan_omp_op (&at, ctx->outer);
- tree nt = omp_copy_decl_1 (at, ctx);
+ tree nt = omp_copy_decl_1 (at, ctx->outer);
splay_tree_insert (ctx->field_map,
(splay_tree_key) &DECL_CONTEXT (t),
(splay_tree_value) nt);
@@ -1322,7 +1329,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
tree at = decl;
if (ctx->outer)
scan_omp_op (&at, ctx->outer);
- tree nt = omp_copy_decl_1 (at, ctx);
+ tree nt = omp_copy_decl_1 (at, ctx->outer);
splay_tree_insert (ctx->field_map,
(splay_tree_key) &DECL_CONTEXT (decl),
(splay_tree_value) nt);
@@ -3953,6 +3960,7 @@ omp_runtime_api_call (const_tree fndecl)
"get_level",
"get_max_active_levels",
"get_max_task_priority",
+ "get_max_teams",
"get_max_threads",
"get_nested",
"get_num_devices",
@@ -3965,6 +3973,7 @@ omp_runtime_api_call (const_tree fndecl)
"get_proc_bind",
"get_supported_active_levels",
"get_team_num",
+ "get_teams_thread_limit",
"get_thread_limit",
"get_thread_num",
"get_wtick",
@@ -3998,8 +4007,10 @@ omp_runtime_api_call (const_tree fndecl)
"set_dynamic",
"set_max_active_levels",
"set_nested",
+ "set_num_teams",
"set_num_threads",
- "set_schedule"
+ "set_schedule",
+ "set_teams_thread_limit"
};
int mode = 0;