Hahnfeld added inline comments. ================ Comment at: lib/CodeGen/CGStmtOpenMP.cpp:3074-3078 @@ +3073,7 @@ + + if (getLangOpts().OpenMPIsDevice && ( + CGM.getTarget().getTriple().getArch() == llvm::Triple::nvptx || + CGM.getTarget().getTriple().getArch() == llvm::Triple::nvptx64)) + CGM.getOpenMPRuntime().emitInlinedDirective(*this, OMPD_teams, CodeGen); + else + emitCommonOMPTeamsDirective(*this, S, OMPD_teams, CodeGen); ---------------- This now duplicates logic from `CodeGenModule::createOpenMPRuntime` and has to be extended for every new triple in multiple places.
I would like to propose a new function like `virtual bool CGOpenMPRuntime::shouldEmitInlinedTeamsDirective` which defaults to `false` and can be overriden in `CGOpenMPRuntimeNVPTX`. This way we can later on easily reuse the logic for new device types and target triples. Repository: rL LLVM http://reviews.llvm.org/D18286 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits