[clang] [CIR][OpenMP] Emit #pragma omp for as omp.wsloop + omp.loop_nest (PR #181841)

Konstantinos Parasyris via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 13 06:31:05 PDT 2026


================
@@ -63,6 +63,43 @@ class CIRGenFunction : public CIRGenTypeCache {
   /// is where the next operations will be introduced.
   CIRGenBuilderTy &builder;
 
+  /// State used to communicate OpenMP loop bounds from `emitOMPForDirective`
+  /// to `emitForStmt`.
+  struct LoopBounds {
+    mlir::Value lowerBound;
+    mlir::Value upperBound;
+    mlir::Value step;
+    mlir::Type inductionVarType;
+    const VarDecl *inductionVar;
+    bool inclusive;
+  };
----------------
koparasy wrote:

IIRC OG calls this `OMPLoopArguments`, shouldn't we pick that naming convention and follow their pattern? It will be easier for people who are already aware of OG codegen to help out in CIR.

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


More information about the cfe-commits mailing list