This is an archive of the discontinued LLVM Phabricator instance.

[OMPT] Reset task exit frame when execution is finished
ClosedPublic

Authored by protze.joachim on Aug 9 2016, 3:55 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

protze.joachim retitled this revision from to [OMPT] Reset task exit frame when execution is finished.
protze.joachim updated this object.
jlpeyton added inline comments.Aug 17 2016, 1:34 PM
runtime/src/kmp_runtime.c
1549 ↗(On Diff #67313)

Use NULL instead. And can this be moved down to the #if OMPT_SUPPORT section just 4 to 5 lines below?

1749 ↗(On Diff #67313)

Same here.

1858 ↗(On Diff #67313)

Same here.

6836 ↗(On Diff #67313)

Use NULL instead.

Adding Jonas and John to list of reviewers.

protze.joachim edited edge metadata.

Merged OMPT - blocks where appropriate, replaced =0 by =NULL.

Hahnfeld resigned from this revision.Aug 19 2016, 12:15 AM
Hahnfeld edited reviewers, added: omalyshe; removed: Hahnfeld.

LGTM from an OMPT perspective

AndreyChurbanov accepted this revision.Aug 19 2016, 6:29 AM
AndreyChurbanov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 19 2016, 6:29 AM
jlpeyton accepted this revision.Aug 19 2016, 2:47 PM
jlpeyton edited edge metadata.

LGTM

This revision was automatically updated to reflect the committed changes.