ABataev added inline comments. ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:340-341 @@ +339,4 @@ + case llvm::Triple::nvptx64: + assert(CGM.getLangOpts().OpenMPIsDevice && + "OpenMP NVPTX is only prepared to deal with device code."); + return createCGOpenMPRuntimeNVPTX(CGM); ---------------- I think it is better to reorganize this code like that: ``` switch (CGM.getTarget().getTriple().getArch()) { case llvm::Triple::nvptx: case llvm::Triple::nvptx64: assert(CGM.getLangOpts().OpenMPIsDevice && "OpenMP NVPTX is only prepared to deal with device code."); return new CGOpenMPRuntimeNVPTX(CGM); default: break; } return new CGOpenMPRuntime(CGM); ```
================ 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: ---------------- Do you really need this function? Currently, I don't see a point in adding this platform-specific thing to (mostly) common interface http://reviews.llvm.org/D16784 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits