ABataev added inline comments. ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:49-51 @@ -48,2 +48,5 @@ TargetRegion, + /// \brief Region that do not require function outlining and uses + /// information from a inner scope. + InlinedInnerRegion, }; ---------------- Do we really need this one? I don't think it will be used in codegen for directives, so do not add it.
================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:316-318 @@ +315,5 @@ + static bool classof(const CGCapturedStmtInfo *Info) { + return CGOpenMPRegionInfo::classof(Info) && + cast<CGOpenMPRegionInfo>(Info)->getRegionKind() == + InlinedInnerRegion; + } ---------------- I think it will be enough just to return 'false' here always, it should not be used in any casting operations ever ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:4438-4440 @@ +4437,5 @@ + + if (NumTeams) { + assert(ThreadLimit && "Thread limit expression should be available along " + "with number of teams."); + llvm::Value *OffloadingArgs[] = { ---------------- What if ThreadLimit is 'nullptr'? And why it cannot be 'nullptr' if NumTeams is not 'nullptr'? ================ Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2712 @@ +2711,3 @@ +void CodeGenFunction::EmitOMPTeamsDirective(const OMPTeamsDirective &S) { + LexicalScope Scope(*this, S.getSourceRange()); + const CapturedStmt &CS = *cast<CapturedStmt>(S.getAssociatedStmt()); ---------------- Use 'OMPLexicalScope Scope(*this, S);' instead. http://reviews.llvm.org/D17019 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits