diff options
author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-05-06 19:22:36 +0000 |
---|---|---|
committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-05-06 19:22:36 +0000 |
commit | 51aecb82cdb1031186a345201abe73f4bc5cf90c (patch) | |
tree | 6593303efd46c1276edeeb8109c801b762752834 /openmp/runtime/src/kmp_sched.cpp | |
parent | 036181471c86f2801100ce947e4a747a5b3fe16e (diff) | |
download | bcm5719-llvm-51aecb82cdb1031186a345201abe73f4bc5cf90c.tar.gz bcm5719-llvm-51aecb82cdb1031186a345201abe73f4bc5cf90c.zip |
D9302.partial2: cleanup of ittnotify checks, that eliminats redundant notifications in case of nested regions.
llvm-svn: 236631
Diffstat (limited to 'openmp/runtime/src/kmp_sched.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_sched.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/openmp/runtime/src/kmp_sched.cpp b/openmp/runtime/src/kmp_sched.cpp index 375cacbc835..46b5987cf56 100644 --- a/openmp/runtime/src/kmp_sched.cpp +++ b/openmp/runtime/src/kmp_sched.cpp @@ -92,6 +92,7 @@ __kmp_for_static_init( register kmp_uint32 nth; register UT trip_count; register kmp_team_t *team; + register kmp_info_t *th = __kmp_threads[ gtid ]; #if OMPT_SUPPORT && OMPT_TRACE ompt_team_info_t *team_info = __ompt_get_teaminfo(0, NULL); @@ -157,13 +158,13 @@ __kmp_for_static_init( if ( schedtype > kmp_ord_upper ) { // we are in DISTRIBUTE construct schedtype += kmp_sch_static - kmp_distribute_static; // AC: convert to usual schedule type - tid = __kmp_threads[ gtid ]->th.th_team->t.t_master_tid; - team = __kmp_threads[ gtid ]->th.th_team->t.t_parent; + tid = th->th.th_team->t.t_master_tid; + team = th->th.th_team->t.t_parent; } else #endif { tid = __kmp_tid_from_gtid( global_tid ); - team = __kmp_threads[ gtid ]->th.th_team; + team = th->th.th_team; } /* determine if "for" loop is an active worksharing construct */ @@ -318,7 +319,12 @@ __kmp_for_static_init( #if USE_ITT_BUILD // Report loop metadata - if ( KMP_MASTER_TID(tid) && __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 ) { + if ( KMP_MASTER_TID(tid) && __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 && +#if OMP_40_ENABLED + th->th.th_teams_microtask == NULL && +#endif + team->t.t_active_level == 1 ) + { kmp_uint64 cur_chunk = chunk; // Calculate chunk in case it was not specified; it is specified for kmp_sch_static_chunked if ( schedtype == kmp_sch_static ) { |