summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-09-14 13:59:19 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-09-14 13:59:19 +0000
commit8a27064e05c0327790c5144bf8498ca4a68152da (patch)
tree90979c5ad899eb41d9921a3bcab6ee4604a55436 /openmp/runtime/src
parentfd0614d8308634755dbf77a0c448a235e97b78b3 (diff)
downloadbcm5719-llvm-8a27064e05c0327790c5144bf8498ca4a68152da.tar.gz
bcm5719-llvm-8a27064e05c0327790c5144bf8498ca4a68152da.zip
[OMPT] Reset task exit frame when execution is finished
The exit address is set when execution of a task is started and should be reset as soon as the execution is finished. Especially for the asm implementation of __kmp_invoke_microtask, resetting in this call would be painfull, so reset just after the invokation. The testcase shows the effect of this patch: Before, the implicit barriers at the end of an implicit task would see an exit address for the implicit task. This barrier is a task scheduling point. Thus, any explicit task scheduled there would see an exit, but no reenter address for the implicit task. Patch by Joachim Protze! Differential Revision: https://reviews.llvm.org/D23307 llvm-svn: 281465
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_runtime.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index fb97c378075..06b5d58bc7e 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -1548,6 +1548,7 @@ __kmp_fork_call(
}
#if OMPT_SUPPORT
+ *exit_runtime_p = NULL;
if (ompt_enabled) {
#if OMPT_TRACE
lw_taskteam.ompt_task_info.frame.exit_runtime_frame = NULL;
@@ -1745,6 +1746,7 @@ __kmp_fork_call(
}
#if OMPT_SUPPORT
+ *exit_runtime_p = NULL;
if (ompt_enabled) {
lw_taskteam.ompt_task_info.frame.exit_runtime_frame = NULL;
@@ -1851,6 +1853,7 @@ __kmp_fork_call(
}
#if OMPT_SUPPORT
+ *exit_runtime_p = NULL;
if (ompt_enabled) {
#if OMPT_TRACE
lw_taskteam.ompt_task_info.frame.exit_runtime_frame = NULL;
@@ -6838,6 +6841,9 @@ __kmp_invoke_task_func( int gtid )
, exit_runtime_p
#endif
);
+#if OMPT_SUPPORT
+ *exit_runtime_p = NULL;
+#endif
}
#if USE_ITT_BUILD
OpenPOWER on IntegriCloud