[llvm-branch-commits] [clang] [openmp] [Clang][OpenMP][Tile] Allow non-constant tile sizes. (PR #91345)

Alexey Bataev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 8 06:05:53 PDT 2024


================
@@ -17432,16 +17457,54 @@ OMPClause *SemaOpenMP::ActOnOpenMPSizesClause(ArrayRef<Expr *> SizeExprs,
                                               SourceLocation StartLoc,
                                               SourceLocation LParenLoc,
                                               SourceLocation EndLoc) {
-  for (Expr *SizeExpr : SizeExprs) {
-    ExprResult NumForLoopsResult = VerifyPositiveIntegerConstantInClause(
-        SizeExpr, OMPC_sizes, /*StrictlyPositive=*/true);
-    if (!NumForLoopsResult.isUsable())
-      return nullptr;
+  SmallVector<Expr *> SanitizedSizeExprs;
+  llvm::append_range(SanitizedSizeExprs, SizeExprs);
----------------
alexey-bataev wrote:

```suggestion
  SmallVector<Expr *> SanitizedSizeExprs(SizeExprs.begin(), SizeExprs.end());
```


https://github.com/llvm/llvm-project/pull/91345


More information about the llvm-branch-commits mailing list