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

2021-06-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.

LG


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99459

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-06-10 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur marked an inline comment as done.
Meinersbur added inline comments.



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2600-2604
+  RValue FactorRVal = EmitAnyExpr(FactorExpr, AggValueSlot::ignored(),
+  /*ignoreResult=*/true);
+  Factor =
+  cast(FactorRVal.getScalarVal())->getZExtValue();
+  assert(Factor >= 1 && "Only positive factors are valid");

ABataev wrote:
> ABataev wrote:
> > I suppose it is compiled-time expression, right? If so, use 
> > `FactorExpr->EvaluateKnownConstInt()` or something similar.
> Not done.
It was done in another branch that I forgot to merge. Sorry.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99459

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-06-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments.



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2600-2604
+  RValue FactorRVal = EmitAnyExpr(FactorExpr, AggValueSlot::ignored(),
+  /*ignoreResult=*/true);
+  Factor =
+  cast(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

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-06-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments.



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12821
+/// Determine whether an expression is constant without emitting diagnostic.
+static bool isConstantExpression(Sema , Expr *E) {
+  struct ConstTripcountDiagnoser : public Sema::VerifyICEDiagnoser {

Meinersbur wrote:
> ABataev wrote:
> > Can you use `VerifyPositiveIntegerConstantInClause` function instead?
> The reason for this new function is that 
> `VerifyPositiveIntegerConstantInClause` also emits a note on why it is not a 
> constant expression:
> ```
> note: read of non-const variable '.capture_expr.' is not allowed in a 
> constant expression
> ```
> Printing internal variable names is more confusing than helpful to the user.
Maybe expand `VerifyPositiveIntegerConstantInClause` to exclude this rather 
than add a new function?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99459

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-06-03 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur marked 8 inline comments as done.
Meinersbur added inline comments.



Comment at: clang/include/clang/AST/StmtOpenMP.h:463-478
+  static const SpecificClause *getSingleClause(ArrayRef Clauses) {
+auto ClausesOfKind = getClausesOfKind(Clauses);
 
-if (Clauses.begin() != Clauses.end()) {
-  assert(std::next(Clauses.begin()) == Clauses.end() &&
+if (ClausesOfKind.begin() != ClausesOfKind.end()) {
+  assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
  "There are at least 2 clauses of the specified kind");
+  return *ClausesOfKind.begin();

ABataev wrote:
> Better to commit it it separately as NFC.
D103665



Comment at: clang/lib/Sema/SemaOpenMP.cpp:10139-10142
+/// Find and diagnose mutually exclusive clause kinds.
+static bool checkMutuallyExclusiveClauses(
+Sema , ArrayRef Clauses,
+ArrayRef MutuallyExclusiveClauses) {

ABataev wrote:
> Would be good if this change is committed separately as NFC.
D103666



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12821
+/// Determine whether an expression is constant without emitting diagnostic.
+static bool isConstantExpression(Sema , Expr *E) {
+  struct ConstTripcountDiagnoser : public Sema::VerifyICEDiagnoser {

ABataev wrote:
> Can you use `VerifyPositiveIntegerConstantInClause` function instead?
The reason for this new function is that 
`VerifyPositiveIntegerConstantInClause` also emits a note on why it is not a 
constant expression:
```
note: read of non-const variable '.capture_expr.' is not allowed in a constant 
expression
```
Printing internal variable names is more confusing than helpful to the user.



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12964
+  assert(Factor > 0 && "Expected positive unroll factor");
+  auto makeFactorExpr = [this, Factor, IVTy, FactorLoc]() {
+return IntegerLiteral::Create(

ABataev wrote:
> Why do you need it? Just use original `PartialClause->getFactor()`
The AST invariant that no ASTNode can be used multiple times (within the same 
DeclContext) must be preserved. This is a utility lambda (like the other 
`MakeXyz`) that create a new IntegerLiteral node for ever use.

See discussion here: https://reviews.llvm.org/D94973?id=322600#inline-905341


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99459

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments.



Comment at: clang/include/clang/AST/OpenMPClause.h:907
+  /// \param C   Context of the AST.
+  /// \param Loc Location of the 'full' identifier.
+  static OMPFullClause *Create(const ASTContext , SourceLocation StartLoc,

Fix params descriptions



Comment at: clang/include/clang/AST/StmtOpenMP.h:463-478
+  static const SpecificClause *getSingleClause(ArrayRef Clauses) {
+auto ClausesOfKind = getClausesOfKind(Clauses);
 
-if (Clauses.begin() != Clauses.end()) {
-  assert(std::next(Clauses.begin()) == Clauses.end() &&
+if (ClausesOfKind.begin() != ClausesOfKind.end()) {
+  assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
  "There are at least 2 clauses of the specified kind");
+  return *ClausesOfKind.begin();

Better to commit it it separately as NFC.



Comment at: clang/lib/AST/StmtOpenMP.cpp:382
+   Stmt *PreInits) {
+  OMPUnrollDirective *Dir = createDirective(
+  C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc);

`auto *`



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2594-2598
+  if (S.hasClausesOfKind())
+LoopStack.setUnrollState(LoopAttributes::Full);
+
+  auto *PartialClause = S.getSingleClause();
+  if (PartialClause) {

Can we have `full` and `partial` at the same time? If no, emit partial in 
`else` substatement for `full` clause.



Comment at: clang/lib/Sema/SemaOpenMP.cpp:8984-8985
+  DependentPreInits = Dir->getPreInits();
+} else
+  llvm_unreachable("Unexpected loop transformation");
 if (!DependentPreInits)

Enclose in braces



Comment at: clang/lib/Sema/SemaOpenMP.cpp:10139-10142
+/// Find and diagnose mutually exclusive clause kinds.
+static bool checkMutuallyExclusiveClauses(
+Sema , ArrayRef Clauses,
+ArrayRef MutuallyExclusiveClauses) {

Would be good if this change is committed separately as NFC.



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12604
+  });
+  assert(OriginalInits.back().empty());
+  OriginalInits.pop_back();

assert message?



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12821
+/// Determine whether an expression is constant without emitting diagnostic.
+static bool isConstantExpression(Sema , Expr *E) {
+  struct ConstTripcountDiagnoser : public Sema::VerifyICEDiagnoser {

Can you use `VerifyPositiveIntegerConstantInClause` function instead?



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12955-12956
+  SourceLocation FactorLoc;
+  if (auto *FactorConst =
+  cast_or_null(PartialClause->getFactor())) {
+Factor = FactorConst->getResultAsAPSInt().getZExtValue();

Better to use `PartialClause->getFactor()->isIntegerConstantExpr(Ctx)` or 
something similar.



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12964
+  assert(Factor > 0 && "Expected positive unroll factor");
+  auto makeFactorExpr = [this, Factor, IVTy, FactorLoc]() {
+return IntegerLiteral::Create(

Why do you need it? Just use original `PartialClause->getFactor()`



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12985
+  buildVarDecl(*this, {}, IVTy, OuterIVName, nullptr, OrigVar);
+  auto makeOuterRef = [this, OuterIVDecl, IVTy, OrigVarLoc]() {
+return buildDeclRefExpr(*this, OuterIVDecl, IVTy, OrigVarLoc);

`MakeOuterRef`



Comment at: clang/lib/Sema/SemaOpenMP.cpp:12993
+  InnerIVDecl->setDeclName(().get(InnerIVName));
+  auto makeInnerRef = [this, InnerIVDecl, IVTy, OrigVarLoc]() {
+return buildDeclRefExpr(*this, InnerIVDecl, IVTy, OrigVarLoc);

`MakeInnerRef`



Comment at: clang/lib/Sema/SemaOpenMP.cpp:13000
+  CaptureVars CopyTransformer(*this);
+  auto makeNumIterations = [, ]() -> Expr * {
+return AssertSuccess(

`MakeNumIterations`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99459

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-05-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment.

Some previous comments were not addressed yet




Comment at: clang/include/clang/AST/OpenMPClause.h:972-974
+  /// Sets the location of '('.
+  void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
+

Make it private



Comment at: clang/lib/AST/StmtOpenMP.cpp:141
+  } else
+break;
+

Enclose in braces



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2600-2604
+  RValue FactorRVal = EmitAnyExpr(FactorExpr, AggValueSlot::ignored(),
+  /*ignoreResult=*/true);
+  Factor =
+  cast(FactorRVal.getScalarVal())->getZExtValue();
+  assert(Factor >= 1 && "Only positive factors are valid");

I suppose it is compiled-time expression, right? If so, use 
`FactorExpr->EvaluateKnownConstInt()` or something similar.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99459

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-05-12 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment.

Removed [WIP] flag; ready to review.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99459

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-03-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments.



Comment at: clang/include/clang/AST/OpenMPClause.h:899
+public:
+  /// Build a 'sizes' AST node.
+  ///

`sizes`->`full`



Comment at: clang/include/clang/AST/OpenMPClause.h:902
+  /// \param C Context of the AST.
+  /// \param StartLoc  Location of the 'sizes' identifier.
+  /// \param LParenLoc Location of '('.

Same



Comment at: clang/include/clang/AST/OpenMPClause.h:903
+  /// \param StartLoc  Location of the 'sizes' identifier.
+  /// \param LParenLoc Location of '('.
+  /// \param EndLocLocation of ')'.

No param



Comment at: clang/include/clang/AST/OpenMPClause.h:904
+  /// \param LParenLoc Location of '('.
+  /// \param EndLocLocation of ')'.
+  /// \param Sizes Content of the clause.

Wrong description



Comment at: clang/include/clang/AST/OpenMPClause.h:905
+  /// \param EndLocLocation of ')'.
+  /// \param Sizes Content of the clause.
+  static OMPFullClause *Create(const ASTContext , SourceLocation StartLoc,

No param



Comment at: clang/include/clang/AST/OpenMPClause.h:912
+  /// \param C Context of the AST.
+  /// \param NumSizes Number of items in the clause.
+  static OMPFullClause *CreateEmpty(const ASTContext );

No param



Comment at: clang/include/clang/AST/OpenMPClause.h:946
+public:
+  /// Build a 'sizes' AST node.
+  ///

sizes->partial



Comment at: clang/include/clang/AST/OpenMPClause.h:948-952
+  /// \param C Context of the AST.
+  /// \param StartLoc  Location of the 'sizes' identifier.
+  /// \param LParenLoc Location of '('.
+  /// \param EndLocLocation of ')'.
+  /// \param Sizes Content of the clause.

Fix params descriptions



Comment at: clang/include/clang/AST/OpenMPClause.h:957-960
+  /// Build an empty 'sizes' AST node for deserialization.
+  ///
+  /// \param C Context of the AST.
+  /// \param NumSizes Number of items in the clause.

Description



Comment at: clang/include/clang/AST/OpenMPClause.h:971
+
+  void setFactor(Expr *E) { Factor = E; }
+

Make it private, if possible



Comment at: clang/include/clang/AST/StmtOpenMP.h:5037
 
+/// This represents the '#pragma omp tile' loop transformation directive.
+class OMPUnrollDirective final : public OMPLoopBasedDirective {

Description



Comment at: clang/include/clang/AST/StmtOpenMP.h:5061-5072
+  /// Create a new AST node representation for '#pragma omp tile'.
+  ///
+  /// \param C Context of the AST.
+  /// \param StartLoc  Location of the introducer (e.g. the 'omp' token).
+  /// \param EndLocLocation of the directive's end (e.g. the tok::eod).
+  /// \param Clauses   The directive's clauses.
+  /// \param NumLoops  Number of associated loops (number of items in the

Fix description



Comment at: clang/include/clang/AST/StmtOpenMP.h:5078-5082
+  /// Build an empty '#pragma omp tile' AST node for deserialization.
+  ///
+  /// \param C  Context of the AST.
+  /// \param NumClauses Number of clauses to allocate.
+  /// \param NumLoops   Number of associated loops to allocate.

Description



Comment at: clang/lib/AST/StmtProfile.cpp:466
 void OMPClauseProfiler::VisitOMPSizesClause(const OMPSizesClause *C) {
-  for (auto E : C->getSizesRefs())
+  for (Expr *E : C->getSizesRefs())
 if (E)

Unelated change?



Comment at: clang/lib/AST/StmtProfile.cpp:474
+void OMPClauseProfiler::VisitOMPPartialClause(const OMPPartialClause *C) {
+  if (Expr *Factor = C->getFactor())
+Profiler->VisitExpr(Factor);

`const Expr *`



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2573
+
+  auto FullClauses = S.getClausesOfKind();
+  const OMPFullClause *FullClause = nullptr;

`getSingleClause` or `hasClausesOfKind`



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2580
+
+  auto PartialClauses = S.getClausesOfKind();
+  const OMPPartialClause *PartialClause = nullptr;

`getSingleClause`



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2589
+  if (PartialClause) {
+if (Expr *FactorExpr = PartialClause->getFactor()) {
+  RValue FactorRVal = EmitAnyExpr(FactorExpr, AggValueSlot::ignored(),

`const Expr *`



Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:2590-2593
+  RValue FactorRVal = EmitAnyExpr(FactorExpr, AggValueSlot::ignored(),
+  /*ignoreResult=*/true);
+  Factor =
+  cast(FactorRVal.getScalarVal())->getZExtValue();

I suppose it is compiled-time 

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

2021-03-27 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur created this revision.
Meinersbur added projects: OpenMP, clang.
Herald added subscribers: dexonsmith, martong, arphaman, zzheng, guansong, 
yaxunl.
Meinersbur requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, cfe-commits, sstefan1.
Herald added a project: LLVM.

Implementation of the unroll directive introduced in OpenMP 5.1. Follows the 
approach from D76342  for the tile directive 
(i.e. AST-based, not using the OpenMPIRBuilder). Tries to use 
`llvm.loop.unroll.*` metadata where possible, but has to fall back to an AST 
representation of the outer loop if the partially unrolled generated loop is 
associated with another directive (because it needs to compute the number of 
iterations).

This is work in progress, tests and some diagnostics are still missing.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99459

Files:
  clang/include/clang-c/Index.h
  clang/include/clang/AST/OpenMPClause.h
  clang/include/clang/AST/RecursiveASTVisitor.h
  clang/include/clang/AST/StmtOpenMP.h
  clang/include/clang/Basic/StmtNodes.td
  clang/include/clang/Sema/Sema.h
  clang/include/clang/Serialization/ASTBitCodes.h
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/AST/StmtOpenMP.cpp
  clang/lib/AST/StmtPrinter.cpp
  clang/lib/AST/StmtProfile.cpp
  clang/lib/Basic/OpenMPKinds.cpp
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/CodeGen/CGStmt.cpp
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaExceptionSpec.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/lib/Sema/TreeTransform.h
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTReaderStmt.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/lib/Serialization/ASTWriterStmt.cpp
  clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
  clang/test/OpenMP/unroll_ast_print.cpp
  clang/test/OpenMP/unroll_codegen.cpp
  clang/tools/libclang/CIndex.cpp
  clang/tools/libclang/CXCursor.cpp
  llvm/include/llvm/Frontend/OpenMP/OMP.td

Index: llvm/include/llvm/Frontend/OpenMP/OMP.td
===
--- llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -69,6 +69,8 @@
   let flangClass = "OmpObjectList";
 }
 def OMPC_Sizes: Clause<"sizes"> { let clangClass = "OMPSizesClause"; }
+def OMPC_Full: Clause<"full"> { let clangClass = "OMPFullClause"; }
+def OMPC_Partial: Clause<"partial"> { let clangClass = "OMPPartialClause"; }
 def OMPC_FirstPrivate : Clause<"firstprivate"> {
   let clangClass = "OMPFirstprivateClause";
   let flangClass = "OmpObjectList";
@@ -381,6 +383,12 @@
 VersionedClause,
   ];
 }
+def OMP_Unroll : Directive<"unroll"> {
+  let allowedOnceClauses = [
+VersionedClause,
+VersionedClause,
+  ];
+}
 def OMP_For : Directive<"for"> {
   let allowedClauses = [
 VersionedClause,
Index: clang/tools/libclang/CXCursor.cpp
===
--- clang/tools/libclang/CXCursor.cpp
+++ clang/tools/libclang/CXCursor.cpp
@@ -651,6 +651,9 @@
   case Stmt::OMPTileDirectiveClass:
 K = CXCursor_OMPTileDirective;
 break;
+  case Stmt::OMPUnrollDirectiveClass:
+K = CXCursor_OMPUnrollDirective;
+break;
   case Stmt::OMPForDirectiveClass:
 K = CXCursor_OMPForDirective;
 break;
Index: clang/tools/libclang/CIndex.cpp
===
--- clang/tools/libclang/CIndex.cpp
+++ clang/tools/libclang/CIndex.cpp
@@ -2045,6 +2045,7 @@
   void VisitOMPParallelDirective(const OMPParallelDirective *D);
   void VisitOMPSimdDirective(const OMPSimdDirective *D);
   void VisitOMPTileDirective(const OMPTileDirective *D);
+  void VisitOMPUnrollDirective(const OMPUnrollDirective *D);
   void VisitOMPForDirective(const OMPForDirective *D);
   void VisitOMPForSimdDirective(const OMPForSimdDirective *D);
   void VisitOMPSectionsDirective(const OMPSectionsDirective *D);
@@ -2219,10 +2220,27 @@
 }
 
 void OMPClauseEnqueue::VisitOMPSizesClause(const OMPSizesClause *C) {
-  for (auto E : C->getSizesRefs())
+  for (Expr* E : C->getSizesRefs())
 Visitor->AddStmt(E);
 }
 
+
+
+
+
+void OMPClauseEnqueue::VisitOMPFullClause(const OMPFullClause *C) {}
+
+
+void OMPClauseEnqueue::VisitOMPPartialClause(const OMPPartialClause *C) {
+  Visitor->AddStmt(C->getFactor());
+}
+
+
+
+
+
+
+
 void OMPClauseEnqueue::VisitOMPAllocatorClause(const OMPAllocatorClause *C) {
   Visitor->AddStmt(C->getAllocator());
 }
@@ -2872,6 +2890,12 @@
   VisitOMPLoopBasedDirective(D);
 }
 
+
+void EnqueueVisitor::VisitOMPUnrollDirective(const OMPUnrollDirective *D) {
+  VisitOMPLoopBasedDirective(D);
+}
+
+
 void EnqueueVisitor::VisitOMPForDirective(const OMPForDirective *D) {
   VisitOMPLoopDirective(D);
 }
@@ -5550,6 +5574,8 @@
 return cxstring::createRef("OMPSimdDirective");
   case CXCursor_OMPTileDirective: