[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
Fri Dec 30 00:36:21 PST 2016

ABataev added inline comments.

Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:114
   /// \brief Get the name of the capture helper.
-  StringRef getHelperName() const override { return ".omp_outlined."; }
+  StringRef getHelperName() const override { return "__omp_outlined__"; }
arpith-jacob wrote:
> ABataev wrote:
> > arpith-jacob wrote:
> > > On the nvptx device, it is illegal for an identifier to contain a dot ('.') so I've modified it here.  If there is a better way to do this, please let me know.
> > Could you just override this function in CGOpenMPRuntimeNVPTX?
> Alexey, thank you for your review of this patch.
> To override getHelperName() in CGOpenMPRuntime.cpp, I will have to move the two classes  CGOpenMPRegionInfo and CGOpenMPOutlinedRegionInfo from the anonymous namespace to the header file in CGOpenMPRuntime.h (under protected mode).  I would prefer to do this since I will need to use these classes for implementing codegen of other directives in the future.
> Is that okay with you?
Yes, go ahead


More information about the cfe-commits mailing list