[Openmp-commits] [PATCH] D64080: [OPENMP]Make __kmpc_push_tripcount thread safe.
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 2 12:51:37 PDT 2019
jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.
This looks generally good to me and I think we should get this fix in. I have one nit inlined, and two follow up questions below:
1. Do we need to be interoperable with `std::thread`? I mean, would it be sufficient to ask for the OpenMP thread ID instead of the `std::this_thread::get_id()`?
2. Shouldn't we move the whole loop trip count logic into the target offload call? Afaik, we currently emit sth. like:
Now if we would move the N as a parameter into the "target" call we would not need to store it anyway, or am I missing something here?
Comment at: libomptarget/src/omptarget.cpp:738
+ ltc = I->second;
+ I->second = 0;
Nit: `std::swap(ltc, I->second)` and no braces.
CHANGES SINCE LAST ACTION
More information about the Openmp-commits