@@ -777,11 +777,22 @@ class CGOpenMPRuntime {
777777 // / specified, nullptr otherwise.
778778 // / \param NumThreads The value corresponding to the num_threads clause, if
779779 // / any, or nullptr.
780+ // / \param NumThreadsModifier The modifier of the num_threads clause, if
781+ // / any, ignored otherwise.
782+ // / \param Severity The severity corresponding to the num_threads clause, if
783+ // / any, ignored otherwise.
784+ // / \param Message The message string corresponding to the num_threads clause,
785+ // / if any, or nullptr.
780786 // /
781- virtual void emitParallelCall (CodeGenFunction &CGF, SourceLocation Loc,
782- llvm::Function *OutlinedFn,
783- ArrayRef<llvm::Value *> CapturedVars,
784- const Expr *IfCond, llvm::Value *NumThreads);
787+ virtual void
788+ emitParallelCall (CodeGenFunction &CGF, SourceLocation Loc,
789+ llvm::Function *OutlinedFn,
790+ ArrayRef<llvm::Value *> CapturedVars, const Expr *IfCond,
791+ llvm::Value *NumThreads,
792+ OpenMPNumThreadsClauseModifier NumThreadsModifier =
793+ OMPC_NUMTHREADS_unknown,
794+ OpenMPSeverityClauseKind Severity = OMPC_SEVERITY_fatal,
795+ const Expr *Message = nullptr );
785796
786797 // / Emits a critical region.
787798 // / \param CriticalName Name of the critical region.
@@ -1040,10 +1051,16 @@ class CGOpenMPRuntime {
10401051 // / Emits call to void __kmpc_push_num_threads(ident_t *loc, kmp_int32
10411052 // / global_tid, kmp_int32 num_threads) to generate code for 'num_threads'
10421053 // / clause.
1054+ // / If the modifier 'strict' is given:
1055+ // / Emits call to void __kmpc_push_num_threads_strict(ident_t *loc, kmp_int32
1056+ // / global_tid, kmp_int32 num_threads, int severity, const char *message) to
1057+ // / generate code for 'num_threads' clause with 'strict' modifier.
10431058 // / \param NumThreads An integer value of threads.
1044- virtual void emitNumThreadsClause (CodeGenFunction &CGF,
1045- llvm::Value *NumThreads,
1046- SourceLocation Loc);
1059+ virtual void emitNumThreadsClause (
1060+ CodeGenFunction &CGF, llvm::Value *NumThreads, SourceLocation Loc,
1061+ OpenMPNumThreadsClauseModifier Modifier = OMPC_NUMTHREADS_unknown,
1062+ OpenMPSeverityClauseKind Severity = OMPC_SEVERITY_fatal,
1063+ const Expr *Message = nullptr );
10471064
10481065 // / Emit call to void __kmpc_push_proc_bind(ident_t *loc, kmp_int32
10491066 // / global_tid, int proc_bind) to generate code for 'proc_bind' clause.
@@ -1737,11 +1754,21 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime {
17371754 // / specified, nullptr otherwise.
17381755 // / \param NumThreads The value corresponding to the num_threads clause, if
17391756 // / any, or nullptr.
1757+ // / \param NumThreadsModifier The modifier of the num_threads clause, if
1758+ // / any, ignored otherwise.
1759+ // / \param Severity The severity corresponding to the num_threads clause, if
1760+ // / any, ignored otherwise.
1761+ // / \param Message The message string corresponding to the num_threads clause,
1762+ // / if any, or nullptr.
17401763 // /
17411764 void emitParallelCall (CodeGenFunction &CGF, SourceLocation Loc,
17421765 llvm::Function *OutlinedFn,
17431766 ArrayRef<llvm::Value *> CapturedVars,
1744- const Expr *IfCond, llvm::Value *NumThreads) override ;
1767+ const Expr *IfCond, llvm::Value *NumThreads,
1768+ OpenMPNumThreadsClauseModifier NumThreadsModifier =
1769+ OMPC_NUMTHREADS_unknown,
1770+ OpenMPSeverityClauseKind Severity = OMPC_SEVERITY_fatal,
1771+ const Expr *Message = nullptr ) override ;
17451772
17461773 // / Emits a critical region.
17471774 // / \param CriticalName Name of the critical region.
@@ -1911,9 +1938,16 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime {
19111938 // / Emits call to void __kmpc_push_num_threads(ident_t *loc, kmp_int32
19121939 // / global_tid, kmp_int32 num_threads) to generate code for 'num_threads'
19131940 // / clause.
1941+ // / If the modifier 'strict' is given:
1942+ // / Emits call to void __kmpc_push_num_threads_strict(ident_t *loc, kmp_int32
1943+ // / global_tid, kmp_int32 num_threads, int severity, const char *message) to
1944+ // / generate code for 'num_threads' clause with 'strict' modifier.
19141945 // / \param NumThreads An integer value of threads.
1915- void emitNumThreadsClause (CodeGenFunction &CGF, llvm::Value *NumThreads,
1916- SourceLocation Loc) override ;
1946+ void emitNumThreadsClause (
1947+ CodeGenFunction &CGF, llvm::Value *NumThreads, SourceLocation Loc,
1948+ OpenMPNumThreadsClauseModifier Modifier = OMPC_NUMTHREADS_unknown,
1949+ OpenMPSeverityClauseKind Severity = OMPC_SEVERITY_fatal,
1950+ const Expr *Message = nullptr ) override ;
19171951
19181952 // / Emit call to void __kmpc_push_proc_bind(ident_t *loc, kmp_int32
19191953 // / global_tid, int proc_bind) to generate code for 'proc_bind' clause.
0 commit comments