[PATCH] D28145: [OpenMP] Basic support for a parallel directive in a target region on an NVPTX device.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 2 01:03:28 PST 2017


ABataev added inline comments.


================
Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:539-542
+    llvm::Value *EndArgs[] = {emitUpdateLocation(CGF, Loc), ThreadID};
+    CGF.EmitRuntimeCall(
+        createNVPTXRuntimeFunction(OMPRTL_NVPTX__kmpc_end_serialized_parallel),
+        EndArgs);
----------------
It is better to emit this code as PrePostAction, so it is called upon exit of any cleanup scope


https://reviews.llvm.org/D28145





More information about the cfe-commits mailing list