[PATCH] D16784: [OpenMP] Reorganize code to allow specialized code generation for different devices.

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 3 22:38:14 PST 2016


ABataev added inline comments.

================
Comment at: lib/CodeGen/CGOpenMPRuntime.h:552-555
@@ -551,2 +551,6 @@
 
+  /// \brief Create specialized OpenMP runtime code generation class for NVPTX
+  /// targets.
+  static CGOpenMPRuntime *createCGOpenMPRuntimeNVPTX(CodeGenModule &CGM);
+
 public:
----------------
sfantao wrote:
> ABataev wrote:
> > Do you really need this function? Currently, I don't see a point in adding this platform-specific thing to (mostly) common interface
> I am using that function to avoid exposing the constructor of `CGOpenMPRuntimeNVPTX ` in CGOpenMPRuntime.h. Do you prefer me to do that instead?
Why do you need to expose constructor of CGOpenMPRuntimeNVPTX in CGOpenMPRuntime.h? It must be exposed only in CGOpenMPRuntime.cpp. Also, it would be a good idea to remove CGOpenMPRuntime::create() and move the whole logic to CodeGenModule::createOpenMPRuntime()


http://reviews.llvm.org/D16784





More information about the cfe-commits mailing list