[Openmp-commits] [PATCH] D93055: [OpenMP] Add time profiling for libomptarget
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Dec 10 12:00:35 PST 2020
jdoerfert added a comment.
I left two comments that we should address now, a third can be future work and the rest has already nice TODOs in the code. Thanks for working on this so quickly.
================
Comment at: openmp/libomptarget/src/CMakeLists.txt:40
+ target_compile_definitions(omptarget PUBLIC OMPTARGET_PROFILE)
+endif()
----------------
Add a CMAKE flag to disable this, by default it can be enabled though.
================
Comment at: openmp/libomptarget/src/api.cpp:21
+#define TIMESCOPE
+#endif
----------------
Maybe we could move this in one of the header, private or rtl? We might even later use it for internal functions.
================
Comment at: openmp/libomptarget/src/interface.cpp:136
void **arg_mappers) {
+ TIMESCOPE
if (IsOffloadDisabled()) return;
----------------
We should pass `loc` to `TIMESCOPE`.
If it is not null, we can pass `reinterpret_cast<const char *>(loc->psource)` for now as second argument to the TimeScope constructor.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93055/new/
https://reviews.llvm.org/D93055
More information about the Openmp-commits
mailing list