[clang] 0833493 - [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (#155848)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 8 01:47:06 PDT 2025
Author: Roger Ferrer Ibáñez
Date: 2025-09-08T10:47:01+02:00
New Revision: 0833493603e44d27771de23e9c925d04fb4a0525
URL: https://github.com/llvm/llvm-project/commit/0833493603e44d27771de23e9c925d04fb4a0525
DIFF: https://github.com/llvm/llvm-project/commit/0833493603e44d27771de23e9c925d04fb4a0525.diff
LOG: [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (#155848)
This is preparatory work for the implementation of `#pragma omp fuse` in
https://github.com/llvm/llvm-project/pull/139293
Not all OpenMP loop transformations makes sense to make them inherit
from `OMPLoopBasedDirective`, in particular in OpenMP 6.0 'fuse' (to be
implemented later) is a transformation of a canonical loop sequence.
This change renames class `OMPLoopTransformationDirective` to
`OMPCanonicalLoopNestTransformationDirective` so we can reclaim that
name in a later change.
Added:
Modified:
clang/include/clang/AST/StmtOpenMP.h
clang/include/clang/Basic/OpenMPKinds.h
clang/include/clang/Basic/StmtNodes.td
clang/lib/AST/StmtOpenMP.cpp
clang/lib/AST/StmtProfile.cpp
clang/lib/Basic/OpenMPKinds.cpp
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriterStmt.cpp
clang/tools/libclang/CIndex.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/AST/StmtOpenMP.h b/clang/include/clang/AST/StmtOpenMP.h
index 2fb33d3036bca..a436676113921 100644
--- a/clang/include/clang/AST/StmtOpenMP.h
+++ b/clang/include/clang/AST/StmtOpenMP.h
@@ -889,23 +889,24 @@ class OMPLoopBasedDirective : public OMPExecutableDirective {
/// Calls the specified callback function for all the loops in \p CurStmt,
/// from the outermost to the innermost.
- static bool
- doForAllLoops(Stmt *CurStmt, bool TryImperfectlyNestedLoops,
- unsigned NumLoops,
- llvm::function_ref<bool(unsigned, Stmt *)> Callback,
- llvm::function_ref<void(OMPLoopTransformationDirective *)>
- OnTransformationCallback);
+ static bool doForAllLoops(
+ Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
+ llvm::function_ref<bool(unsigned, Stmt *)> Callback,
+ llvm::function_ref<void(OMPCanonicalLoopNestTransformationDirective *)>
+ OnTransformationCallback);
static bool
doForAllLoops(const Stmt *CurStmt, bool TryImperfectlyNestedLoops,
unsigned NumLoops,
llvm::function_ref<bool(unsigned, const Stmt *)> Callback,
- llvm::function_ref<void(const OMPLoopTransformationDirective *)>
+ llvm::function_ref<
+ void(const OMPCanonicalLoopNestTransformationDirective *)>
OnTransformationCallback) {
auto &&NewCallback = [Callback](unsigned Cnt, Stmt *CurStmt) {
return Callback(Cnt, CurStmt);
};
auto &&NewTransformCb =
- [OnTransformationCallback](OMPLoopTransformationDirective *A) {
+ [OnTransformationCallback](
+ OMPCanonicalLoopNestTransformationDirective *A) {
OnTransformationCallback(A);
};
return doForAllLoops(const_cast<Stmt *>(CurStmt), TryImperfectlyNestedLoops,
@@ -918,7 +919,7 @@ class OMPLoopBasedDirective : public OMPExecutableDirective {
doForAllLoops(Stmt *CurStmt, bool TryImperfectlyNestedLoops,
unsigned NumLoops,
llvm::function_ref<bool(unsigned, Stmt *)> Callback) {
- auto &&TransformCb = [](OMPLoopTransformationDirective *) {};
+ auto &&TransformCb = [](OMPCanonicalLoopNestTransformationDirective *) {};
return doForAllLoops(CurStmt, TryImperfectlyNestedLoops, NumLoops, Callback,
TransformCb);
}
@@ -955,19 +956,18 @@ class OMPLoopBasedDirective : public OMPExecutableDirective {
}
};
-/// The base class for all loop transformation directives.
-class OMPLoopTransformationDirective : public OMPLoopBasedDirective {
+/// The base class for all transformation directives of canonical loop nests.
+class OMPCanonicalLoopNestTransformationDirective
+ : public OMPLoopBasedDirective {
friend class ASTStmtReader;
/// Number of loops generated by this loop transformation.
unsigned NumGeneratedLoops = 0;
protected:
- explicit OMPLoopTransformationDirective(StmtClass SC,
- OpenMPDirectiveKind Kind,
- SourceLocation StartLoc,
- SourceLocation EndLoc,
- unsigned NumAssociatedLoops)
+ explicit OMPCanonicalLoopNestTransformationDirective(
+ StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc,
+ SourceLocation EndLoc, unsigned NumAssociatedLoops)
: OMPLoopBasedDirective(SC, Kind, StartLoc, EndLoc, NumAssociatedLoops) {}
/// Set the number of loops generated by this loop transformation.
@@ -5545,7 +5545,8 @@ class OMPTargetTeamsDistributeSimdDirective final : public OMPLoopDirective {
};
/// This represents the '#pragma omp tile' loop transformation directive.
-class OMPTileDirective final : public OMPLoopTransformationDirective {
+class OMPTileDirective final
+ : public OMPCanonicalLoopNestTransformationDirective {
friend class ASTStmtReader;
friend class OMPExecutableDirective;
@@ -5557,9 +5558,9 @@ class OMPTileDirective final : public OMPLoopTransformationDirective {
explicit OMPTileDirective(SourceLocation StartLoc, SourceLocation EndLoc,
unsigned NumLoops)
- : OMPLoopTransformationDirective(OMPTileDirectiveClass,
- llvm::omp::OMPD_tile, StartLoc, EndLoc,
- NumLoops) {
+ : OMPCanonicalLoopNestTransformationDirective(
+ OMPTileDirectiveClass, llvm::omp::OMPD_tile, StartLoc, EndLoc,
+ NumLoops) {
setNumGeneratedLoops(2 * NumLoops);
}
@@ -5622,7 +5623,8 @@ class OMPTileDirective final : public OMPLoopTransformationDirective {
};
/// This represents the '#pragma omp stripe' loop transformation directive.
-class OMPStripeDirective final : public OMPLoopTransformationDirective {
+class OMPStripeDirective final
+ : public OMPCanonicalLoopNestTransformationDirective {
friend class ASTStmtReader;
friend class OMPExecutableDirective;
@@ -5634,9 +5636,9 @@ class OMPStripeDirective final : public OMPLoopTransformationDirective {
explicit OMPStripeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
unsigned NumLoops)
- : OMPLoopTransformationDirective(OMPStripeDirectiveClass,
- llvm::omp::OMPD_stripe, StartLoc, EndLoc,
- NumLoops) {
+ : OMPCanonicalLoopNestTransformationDirective(
+ OMPStripeDirectiveClass, llvm::omp::OMPD_stripe, StartLoc, EndLoc,
+ NumLoops) {
setNumGeneratedLoops(2 * NumLoops);
}
@@ -5702,7 +5704,8 @@ class OMPStripeDirective final : public OMPLoopTransformationDirective {
/// #pragma omp unroll
/// for (int i = 0; i < 64; ++i)
/// \endcode
-class OMPUnrollDirective final : public OMPLoopTransformationDirective {
+class OMPUnrollDirective final
+ : public OMPCanonicalLoopNestTransformationDirective {
friend class ASTStmtReader;
friend class OMPExecutableDirective;
@@ -5713,9 +5716,9 @@ class OMPUnrollDirective final : public OMPLoopTransformationDirective {
};
explicit OMPUnrollDirective(SourceLocation StartLoc, SourceLocation EndLoc)
- : OMPLoopTransformationDirective(OMPUnrollDirectiveClass,
- llvm::omp::OMPD_unroll, StartLoc, EndLoc,
- 1) {}
+ : OMPCanonicalLoopNestTransformationDirective(OMPUnrollDirectiveClass,
+ llvm::omp::OMPD_unroll,
+ StartLoc, EndLoc, 1) {}
/// Set the pre-init statements.
void setPreInits(Stmt *PreInits) {
@@ -5776,7 +5779,8 @@ class OMPUnrollDirective final : public OMPLoopTransformationDirective {
/// for (int i = 0; i < n; ++i)
/// ...
/// \endcode
-class OMPReverseDirective final : public OMPLoopTransformationDirective {
+class OMPReverseDirective final
+ : public OMPCanonicalLoopNestTransformationDirective {
friend class ASTStmtReader;
friend class OMPExecutableDirective;
@@ -5788,9 +5792,9 @@ class OMPReverseDirective final : public OMPLoopTransformationDirective {
explicit OMPReverseDirective(SourceLocation StartLoc, SourceLocation EndLoc,
unsigned NumLoops)
- : OMPLoopTransformationDirective(OMPReverseDirectiveClass,
- llvm::omp::OMPD_reverse, StartLoc,
- EndLoc, NumLoops) {
+ : OMPCanonicalLoopNestTransformationDirective(
+ OMPReverseDirectiveClass, llvm::omp::OMPD_reverse, StartLoc, EndLoc,
+ NumLoops) {
setNumGeneratedLoops(NumLoops);
}
@@ -5848,7 +5852,8 @@ class OMPReverseDirective final : public OMPLoopTransformationDirective {
/// for (int j = 0; j < n; ++j)
/// ..
/// \endcode
-class OMPInterchangeDirective final : public OMPLoopTransformationDirective {
+class OMPInterchangeDirective final
+ : public OMPCanonicalLoopNestTransformationDirective {
friend class ASTStmtReader;
friend class OMPExecutableDirective;
@@ -5860,9 +5865,9 @@ class OMPInterchangeDirective final : public OMPLoopTransformationDirective {
explicit OMPInterchangeDirective(SourceLocation StartLoc,
SourceLocation EndLoc, unsigned NumLoops)
- : OMPLoopTransformationDirective(OMPInterchangeDirectiveClass,
- llvm::omp::OMPD_interchange, StartLoc,
- EndLoc, NumLoops) {
+ : OMPCanonicalLoopNestTransformationDirective(
+ OMPInterchangeDirectiveClass, llvm::omp::OMPD_interchange, StartLoc,
+ EndLoc, NumLoops) {
setNumGeneratedLoops(NumLoops);
}
diff --git a/clang/include/clang/Basic/OpenMPKinds.h b/clang/include/clang/Basic/OpenMPKinds.h
index f40db4c13c55a..d3285cd9c6a14 100644
--- a/clang/include/clang/Basic/OpenMPKinds.h
+++ b/clang/include/clang/Basic/OpenMPKinds.h
@@ -365,6 +365,13 @@ bool isOpenMPTaskingDirective(OpenMPDirectiveKind Kind);
/// functions
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind);
+/// Checks if the specified directive is a loop transformation directive that
+/// applies to a canonical loop nest.
+/// \param DKind Specified directive.
+/// \return True iff the directive is a loop transformation.
+bool isOpenMPCanonicalLoopNestTransformationDirective(
+ OpenMPDirectiveKind DKind);
+
/// Checks if the specified directive is a loop transformation directive.
/// \param DKind Specified directive.
/// \return True iff the directive is a loop transformation.
diff --git a/clang/include/clang/Basic/StmtNodes.td b/clang/include/clang/Basic/StmtNodes.td
index 046ef4f30e232..dd1a24405fae7 100644
--- a/clang/include/clang/Basic/StmtNodes.td
+++ b/clang/include/clang/Basic/StmtNodes.td
@@ -230,12 +230,14 @@ def OMPLoopBasedDirective : StmtNode<OMPExecutableDirective, 1>;
def OMPLoopDirective : StmtNode<OMPLoopBasedDirective, 1>;
def OMPParallelDirective : StmtNode<OMPExecutableDirective>;
def OMPSimdDirective : StmtNode<OMPLoopDirective>;
-def OMPLoopTransformationDirective : StmtNode<OMPLoopBasedDirective, 1>;
-def OMPTileDirective : StmtNode<OMPLoopTransformationDirective>;
-def OMPStripeDirective : StmtNode<OMPLoopTransformationDirective>;
-def OMPUnrollDirective : StmtNode<OMPLoopTransformationDirective>;
-def OMPReverseDirective : StmtNode<OMPLoopTransformationDirective>;
-def OMPInterchangeDirective : StmtNode<OMPLoopTransformationDirective>;
+def OMPCanonicalLoopNestTransformationDirective
+ : StmtNode<OMPLoopBasedDirective, 1>;
+def OMPTileDirective : StmtNode<OMPCanonicalLoopNestTransformationDirective>;
+def OMPStripeDirective : StmtNode<OMPCanonicalLoopNestTransformationDirective>;
+def OMPUnrollDirective : StmtNode<OMPCanonicalLoopNestTransformationDirective>;
+def OMPReverseDirective : StmtNode<OMPCanonicalLoopNestTransformationDirective>;
+def OMPInterchangeDirective
+ : StmtNode<OMPCanonicalLoopNestTransformationDirective>;
def OMPForDirective : StmtNode<OMPLoopDirective>;
def OMPForSimdDirective : StmtNode<OMPLoopDirective>;
def OMPSectionsDirective : StmtNode<OMPExecutableDirective>;
diff --git a/clang/lib/AST/StmtOpenMP.cpp b/clang/lib/AST/StmtOpenMP.cpp
index 2eeb5e45ab511..36ecaf6489ef0 100644
--- a/clang/lib/AST/StmtOpenMP.cpp
+++ b/clang/lib/AST/StmtOpenMP.cpp
@@ -125,12 +125,13 @@ OMPLoopBasedDirective::tryToFindNextInnerLoop(Stmt *CurStmt,
bool OMPLoopBasedDirective::doForAllLoops(
Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
llvm::function_ref<bool(unsigned, Stmt *)> Callback,
- llvm::function_ref<void(OMPLoopTransformationDirective *)>
+ llvm::function_ref<void(OMPCanonicalLoopNestTransformationDirective *)>
OnTransformationCallback) {
CurStmt = CurStmt->IgnoreContainers();
for (unsigned Cnt = 0; Cnt < NumLoops; ++Cnt) {
while (true) {
- auto *Dir = dyn_cast<OMPLoopTransformationDirective>(CurStmt);
+ auto *Dir =
+ dyn_cast<OMPCanonicalLoopNestTransformationDirective>(CurStmt);
if (!Dir)
break;
@@ -369,11 +370,11 @@ OMPForDirective *OMPForDirective::Create(
return Dir;
}
-Stmt *OMPLoopTransformationDirective::getTransformedStmt() const {
+Stmt *OMPCanonicalLoopNestTransformationDirective::getTransformedStmt() const {
switch (getStmtClass()) {
#define STMT(CLASS, PARENT)
#define ABSTRACT_STMT(CLASS)
-#define OMPLOOPTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
+#define OMPCANONICALLOOPNESTTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
case Stmt::CLASS##Class: \
return static_cast<const CLASS *>(this)->getTransformedStmt();
#include "clang/AST/StmtNodes.inc"
@@ -382,11 +383,11 @@ Stmt *OMPLoopTransformationDirective::getTransformedStmt() const {
}
}
-Stmt *OMPLoopTransformationDirective::getPreInits() const {
+Stmt *OMPCanonicalLoopNestTransformationDirective::getPreInits() const {
switch (getStmtClass()) {
#define STMT(CLASS, PARENT)
#define ABSTRACT_STMT(CLASS)
-#define OMPLOOPTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
+#define OMPCANONICALLOOPNESTTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
case Stmt::CLASS##Class: \
return static_cast<const CLASS *>(this)->getPreInits();
#include "clang/AST/StmtNodes.inc"
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index 1bc21062203cb..37c4d43ec0b2f 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -999,30 +999,30 @@ void StmtProfiler::VisitOMPSimdDirective(const OMPSimdDirective *S) {
VisitOMPLoopDirective(S);
}
-void StmtProfiler::VisitOMPLoopTransformationDirective(
- const OMPLoopTransformationDirective *S) {
+void StmtProfiler::VisitOMPCanonicalLoopNestTransformationDirective(
+ const OMPCanonicalLoopNestTransformationDirective *S) {
VisitOMPLoopBasedDirective(S);
}
void StmtProfiler::VisitOMPTileDirective(const OMPTileDirective *S) {
- VisitOMPLoopTransformationDirective(S);
+ VisitOMPCanonicalLoopNestTransformationDirective(S);
}
void StmtProfiler::VisitOMPStripeDirective(const OMPStripeDirective *S) {
- VisitOMPLoopTransformationDirective(S);
+ VisitOMPCanonicalLoopNestTransformationDirective(S);
}
void StmtProfiler::VisitOMPUnrollDirective(const OMPUnrollDirective *S) {
- VisitOMPLoopTransformationDirective(S);
+ VisitOMPCanonicalLoopNestTransformationDirective(S);
}
void StmtProfiler::VisitOMPReverseDirective(const OMPReverseDirective *S) {
- VisitOMPLoopTransformationDirective(S);
+ VisitOMPCanonicalLoopNestTransformationDirective(S);
}
void StmtProfiler::VisitOMPInterchangeDirective(
const OMPInterchangeDirective *S) {
- VisitOMPLoopTransformationDirective(S);
+ VisitOMPCanonicalLoopNestTransformationDirective(S);
}
void StmtProfiler::VisitOMPForDirective(const OMPForDirective *S) {
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index 220b31b0f19bc..3f8f64df8702e 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -717,11 +717,17 @@ bool clang::isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind) {
Kind == OMPD_teams_loop || Kind == OMPD_target_teams_loop;
}
-bool clang::isOpenMPLoopTransformationDirective(OpenMPDirectiveKind DKind) {
+bool clang::isOpenMPCanonicalLoopNestTransformationDirective(
+ OpenMPDirectiveKind DKind) {
return DKind == OMPD_tile || DKind == OMPD_unroll || DKind == OMPD_reverse ||
DKind == OMPD_interchange || DKind == OMPD_stripe;
}
+bool clang::isOpenMPLoopTransformationDirective(OpenMPDirectiveKind DKind) {
+ // FIXME: There will be more cases when we implement 'fuse'.
+ return isOpenMPCanonicalLoopNestTransformationDirective(DKind);
+}
+
bool clang::isOpenMPCombinedParallelADirective(OpenMPDirectiveKind DKind) {
return DKind == OMPD_parallel_for || DKind == OMPD_parallel_for_simd ||
DKind == OMPD_parallel_master ||
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 2708fc0470f5b..1360680cc6640 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -1939,7 +1939,8 @@ static void emitBody(CodeGenFunction &CGF, const Stmt *S, const Stmt *NextLoop,
return;
}
if (SimplifiedS == NextLoop) {
- if (auto *Dir = dyn_cast<OMPLoopTransformationDirective>(SimplifiedS))
+ if (auto *Dir =
+ dyn_cast<OMPCanonicalLoopNestTransformationDirective>(SimplifiedS))
SimplifiedS = Dir->getTransformedStmt();
if (const auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(SimplifiedS))
SimplifiedS = CanonLoop->getLoopStmt();
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index a1dd5b090c59b..63a56a6583efc 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -4146,7 +4146,8 @@ class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {
VisitSubCaptures(S);
}
- void VisitOMPLoopTransformationDirective(OMPLoopTransformationDirective *S) {
+ void VisitOMPCanonicalLoopNestTransformationDirective(
+ OMPCanonicalLoopNestTransformationDirective *S) {
// Loop transformation directives do not introduce data sharing
VisitStmt(S);
}
@@ -9773,7 +9774,8 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr,
}
return false;
},
- [&SemaRef, &Captures](OMPLoopTransformationDirective *Transform) {
+ [&SemaRef,
+ &Captures](OMPCanonicalLoopNestTransformationDirective *Transform) {
Stmt *DependentPreInits = Transform->getPreInits();
if (!DependentPreInits)
return;
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index 76fdd4024b0b7..7ec8e450fbaca 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -2447,30 +2447,30 @@ void ASTStmtReader::VisitOMPSimdDirective(OMPSimdDirective *D) {
VisitOMPLoopDirective(D);
}
-void ASTStmtReader::VisitOMPLoopTransformationDirective(
- OMPLoopTransformationDirective *D) {
+void ASTStmtReader::VisitOMPCanonicalLoopNestTransformationDirective(
+ OMPCanonicalLoopNestTransformationDirective *D) {
VisitOMPLoopBasedDirective(D);
D->setNumGeneratedLoops(Record.readUInt32());
}
void ASTStmtReader::VisitOMPTileDirective(OMPTileDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void ASTStmtReader::VisitOMPStripeDirective(OMPStripeDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void ASTStmtReader::VisitOMPUnrollDirective(OMPUnrollDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void ASTStmtReader::VisitOMPReverseDirective(OMPReverseDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void ASTStmtReader::VisitOMPInterchangeDirective(OMPInterchangeDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void ASTStmtReader::VisitOMPForDirective(OMPForDirective *D) {
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index dda81557cb22f..07a5cde47a9a8 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -2456,34 +2456,34 @@ void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) {
Code = serialization::STMT_OMP_SIMD_DIRECTIVE;
}
-void ASTStmtWriter::VisitOMPLoopTransformationDirective(
- OMPLoopTransformationDirective *D) {
+void ASTStmtWriter::VisitOMPCanonicalLoopNestTransformationDirective(
+ OMPCanonicalLoopNestTransformationDirective *D) {
VisitOMPLoopBasedDirective(D);
Record.writeUInt32(D->getNumGeneratedLoops());
}
void ASTStmtWriter::VisitOMPTileDirective(OMPTileDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
Code = serialization::STMT_OMP_TILE_DIRECTIVE;
}
void ASTStmtWriter::VisitOMPStripeDirective(OMPStripeDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
Code = serialization::STMP_OMP_STRIPE_DIRECTIVE;
}
void ASTStmtWriter::VisitOMPUnrollDirective(OMPUnrollDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
Code = serialization::STMT_OMP_UNROLL_DIRECTIVE;
}
void ASTStmtWriter::VisitOMPReverseDirective(OMPReverseDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
Code = serialization::STMT_OMP_REVERSE_DIRECTIVE;
}
void ASTStmtWriter::VisitOMPInterchangeDirective(OMPInterchangeDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
Code = serialization::STMT_OMP_INTERCHANGE_DIRECTIVE;
}
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index f255d751362ee..0ed029c39885f 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2154,8 +2154,8 @@ class EnqueueVisitor : public ConstStmtVisitor<EnqueueVisitor, void>,
void VisitOMPLoopDirective(const OMPLoopDirective *D);
void VisitOMPParallelDirective(const OMPParallelDirective *D);
void VisitOMPSimdDirective(const OMPSimdDirective *D);
- void
- VisitOMPLoopTransformationDirective(const OMPLoopTransformationDirective *D);
+ void VisitOMPCanonicalLoopNestTransformationDirective(
+ const OMPCanonicalLoopNestTransformationDirective *D);
void VisitOMPTileDirective(const OMPTileDirective *D);
void VisitOMPStripeDirective(const OMPStripeDirective *D);
void VisitOMPUnrollDirective(const OMPUnrollDirective *D);
@@ -3304,30 +3304,30 @@ void EnqueueVisitor::VisitOMPSimdDirective(const OMPSimdDirective *D) {
VisitOMPLoopDirective(D);
}
-void EnqueueVisitor::VisitOMPLoopTransformationDirective(
- const OMPLoopTransformationDirective *D) {
+void EnqueueVisitor::VisitOMPCanonicalLoopNestTransformationDirective(
+ const OMPCanonicalLoopNestTransformationDirective *D) {
VisitOMPLoopBasedDirective(D);
}
void EnqueueVisitor::VisitOMPTileDirective(const OMPTileDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void EnqueueVisitor::VisitOMPStripeDirective(const OMPStripeDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void EnqueueVisitor::VisitOMPUnrollDirective(const OMPUnrollDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void EnqueueVisitor::VisitOMPReverseDirective(const OMPReverseDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void EnqueueVisitor::VisitOMPInterchangeDirective(
const OMPInterchangeDirective *D) {
- VisitOMPLoopTransformationDirective(D);
+ VisitOMPCanonicalLoopNestTransformationDirective(D);
}
void EnqueueVisitor::VisitOMPForDirective(const OMPForDirective *D) {
More information about the cfe-commits
mailing list