[Openmp-commits] [PATCH] D113124: [OpenMP] Avoid costly shadow map traversals whenever possible
George Rokos via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 10 13:36:30 PST 2021
grokos accepted this revision.
grokos added a comment.
This revision is now accepted and ready to land.
LGTM with two minor nits.
================
Comment at: openmp/libomptarget/src/device.cpp:296
+ void *TargetPointer = NULL;
+ bool IsNew = false;
IsHostPtr = false;
----------------
Can you add a comment explaining that `IsNew` is always going to be `false` because `getTgtPtrBegin` is called from targetDataEnd, targetDataContiguous and processDataBefore, i.e. for data which is expected to be mapped already. And maybe it's more elegant to hardcode `false` in the return statement directly, thus avoiding defining a variable which is never used in the body of this function.
================
Comment at: openmp/libomptarget/src/omptarget.cpp:618
+/// \p Begin + \p Size. \p CB is called with a locked shadow pointer map and the
+/// passed iterator an be updated. If the callback returns OFFLOAD_FAIL the rest
+/// of the map is not checked anymore.
----------------
an be --> can be
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113124/new/
https://reviews.llvm.org/D113124
More information about the Openmp-commits
mailing list