This is an archive of the discontinued LLVM Phabricator instance.

[OMPT] Set frame address when creating a task with dependences
ClosedPublic

Authored by sconvent on Dec 13 2017, 3:41 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

sconvent created this revision.Dec 13 2017, 3:41 AM
sconvent retitled this revision from Set frame address when creating a task with dependences to [OMPT] Set frame address when creating a task with dependences.Dec 13 2017, 3:49 AM
Hahnfeld accepted this revision.Dec 20 2017, 1:23 AM

LG. This fixes the test with GCC which already had the enter address, right?

This revision is now accepted and ready to land.Dec 20 2017, 1:23 AM
protze.joachim requested changes to this revision.Dec 21 2017, 5:02 AM

I think, the address needs to be reset on return. Please include commit 45a3a39 to this patch.

This revision now requires changes to proceed.Dec 21 2017, 5:02 AM

This fixes the test with GCC which already had the enter address, right?

For the GOMP interface the address was already set. When entering using the
KMP interface, the address was not set.
The task is created in the implicit task of the master thread. So there must
be an enter and exit address set, as we are in the runtime.

This patch fixes the test case and sets the reenter address when entering with
the kmpc function.

sconvent updated this revision to Diff 128078.Dec 23 2017, 5:57 AM

Updated revision

Does the latest change assume current_task == new_taskdata->td_parent (which would make sense to me)? If not this change has more implications than the frame address.

Does the latest change assume current_task == new_taskdata->td_parent (which would make sense to me)? If not this change has more implications than the frame address.

Yes, that is the idea behind this change. This avoids to lookup the same pointer in two ways and especially I need the address also at the end of the function.

protze.joachim accepted this revision.Dec 23 2017, 6:50 AM
This revision is now accepted and ready to land.Dec 23 2017, 6:50 AM
Hahnfeld accepted this revision.Dec 23 2017, 7:01 AM

Yes, that is the idea behind this change. This avoids to lookup the same pointer in two ways and especially I need the address also at the end of the function.

Makes sense.

This revision was automatically updated to reflect the committed changes.