diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-09-26 20:24:39 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-09-26 20:24:39 +0000 |
| commit | cf27e31bdd424b3f13537a09418d539272e7bb36 (patch) | |
| tree | 951e148b7417802940b639aecbf6e9781f881b67 /openmp/runtime/src/kmp_tasking.cpp | |
| parent | 60eec6fecb74eb225c76645a9a5a96b3bd2c9684 (diff) | |
| download | bcm5719-llvm-cf27e31bdd424b3f13537a09418d539272e7bb36.tar.gz bcm5719-llvm-cf27e31bdd424b3f13537a09418d539272e7bb36.zip | |
[OpenMP] Fix performance issue from 376.kdtree
This change improves the performance of 376.kdtree by giving the compiler an
opportunity to do inlining and other optimizations for the call path,
__kmpc_omp_task_complete_if0()->__kmp_task_finish(), which is one of the hot
paths in the program; some functions in kmp_taskdeps.cpp were moved to the new
header file, kmp_taskdeps.h to achieve this.
Patch by Hansang Bae
Differential Revision: https://reviews.llvm.org/D51889
llvm-svn: 343138
Diffstat (limited to 'openmp/runtime/src/kmp_tasking.cpp')
| -rw-r--r-- | openmp/runtime/src/kmp_tasking.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp index 9028686bea1..7179d2c3149 100644 --- a/openmp/runtime/src/kmp_tasking.cpp +++ b/openmp/runtime/src/kmp_tasking.cpp @@ -16,6 +16,7 @@ #include "kmp_itt.h" #include "kmp_stats.h" #include "kmp_wait_release.h" +#include "kmp_taskdeps.h" #if OMPT_SUPPORT #include "ompt-specific.h" @@ -764,15 +765,14 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, #if OMP_40_ENABLED if (taskdata->td_taskgroup) KMP_ATOMIC_DEC(&taskdata->td_taskgroup->count); + __kmp_release_deps(gtid, taskdata); #if OMP_45_ENABLED - } - // if we found proxy tasks there could exist a dependency chain - // with the proxy task as origin - if (!(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser) || - (task_team && task_team->tt.tt_found_proxy_tasks)) { -#endif + } else if (task_team && task_team->tt.tt_found_proxy_tasks) { + // if we found proxy tasks there could exist a dependency chain + // with the proxy task as origin __kmp_release_deps(gtid, taskdata); -#endif +#endif // OMP_45_ENABLED +#endif // OMP_40_ENABLED } // td_flags.executing must be marked as 0 after __kmp_release_deps has been |

