Make __ompt_implicit_task_end a static function and remove the inline part. This fixes small regression in SPEC kdtree benchmark. Also reformat some of __ompt_implicit_task_end.
Details
Diff Detail
- Repository
- rOMP OpenMP
Event Timeline
runtime/src/kmp_wait_release.h | ||
---|---|---|
254–261 | Are you sure that you want to remove this lookup? This means always passing NULL AFAICS |
runtime/src/kmp_wait_release.h | ||
---|---|---|
254–261 | Once the value of pId is never used it should be OK to have it NULL for now. Increased code size impacts performance of some tests, so we try to eliminate unused code when possible. |
runtime/src/kmp_wait_release.h | ||
---|---|---|
262 | Well, it's used in this event. |
runtime/src/kmp_wait_release.h | ||
---|---|---|
262 | Here is the complete code of the event you mentioned: static inline void __ompt_implicit_task_end(kmp_info_t *this_thr, ompt_state_t ompt_state, ompt_data_t *tId, ompt_data_t *pId) { int ds_tid = this_thr->th.th_info.ds.ds_tid; if (ompt_state == ompt_state_wait_barrier_implicit) { this_thr->th.ompt_thread_info.state = ompt_state_overhead; void *codeptr = NULL; if (ompt_enabled.ompt_callback_sync_region_wait) { ompt_callbacks.ompt_callback(ompt_callback_sync_region_wait)( ompt_sync_region_barrier, ompt_scope_end, NULL, tId, codeptr); } if (ompt_enabled.ompt_callback_sync_region) { ompt_callbacks.ompt_callback(ompt_callback_sync_region)( ompt_sync_region_barrier, ompt_scope_end, NULL, tId, codeptr); } if (!KMP_MASTER_TID(ds_tid)) { if (ompt_enabled.ompt_callback_implicit_task) { ompt_callbacks.ompt_callback(ompt_callback_implicit_task)( ompt_scope_end, NULL, tId, 0, ds_tid); } // return to idle state this_thr->th.ompt_thread_info.state = ompt_state_idle; } else { this_thr->th.ompt_thread_info.state = ompt_state_overhead; } } } The pId parameter is not used here. |
runtime/src/kmp_wait_release.h | ||
---|---|---|
262 | Ah, didn't look into the function. Can we then remove the argument and the variable completely? |
runtime/src/kmp_wait_release.h | ||
---|---|---|
262 | I would also suggest to completely remove pId here. |
Are you sure that you want to remove this lookup? This means always passing NULL AFAICS