[PATCH] D99459: [OpenMP] Implement '#pragma omp unroll'.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 10 05:35:14 PDT 2021


ABataev added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2600-2604
+      RValue FactorRVal = EmitAnyExpr(FactorExpr, AggValueSlot::ignored(),
+                                      /*ignoreResult=*/true);
+      Factor =
+          cast<llvm::ConstantInt>(FactorRVal.getScalarVal())->getZExtValue();
+      assert(Factor >= 1 && "Only positive factors are valid");
----------------
ABataev wrote:
> I suppose it is compiled-time expression, right? If so, use `FactorExpr->EvaluateKnownConstInt()` or something similar.
Not done.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99459/new/

https://reviews.llvm.org/D99459



More information about the cfe-commits mailing list