[Openmp-commits] [clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)
Alexey Bataev via Openmp-commits
openmp-commits at lists.llvm.org
Sat Sep 20 07:35:14 PDT 2025
================
@@ -371,6 +370,26 @@ OMPForDirective *OMPForDirective::Create(
return Dir;
}
+Stmt *OMPLoopTransformationDirective::getTransformedStmt() const {
+ if (auto *D = dyn_cast<OMPCanonicalLoopNestTransformationDirective>(S)) {
+ return D->getTransformedStmt();
+ }
+ if (auto *D = dyn_cast<OMPCanonicalLoopSequenceTransformationDirective>(S)) {
+ return D->getTransformedStmt();
+ }
+ llvm_unreachable("unexpected object type");
+}
+
+Stmt *OMPLoopTransformationDirective::getPreInits() const {
+ if (auto *D = dyn_cast<OMPCanonicalLoopNestTransformationDirective>(S)) {
+ return D->getPreInits();
+ }
+ if (auto *D = dyn_cast<OMPCanonicalLoopSequenceTransformationDirective>(S)) {
+ return D->getPreInits();
+ }
----------------
alexey-bataev wrote:
Drop braces around one-line substatements
https://github.com/llvm/llvm-project/pull/139293
More information about the Openmp-commits
mailing list