[PATCH] D112499: [OpenMP] Initial parsing/sema for the 'omp loop' construct

Mike Rice via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 16:21:41 PDT 2021


mikerice added a comment.

Thanks for the review.



================
Comment at: clang/lib/Basic/OpenMPKinds.cpp:683
+  case OMPD_loop:
+    CaptureRegions.push_back(OMPD_loop);
+    break;
----------------
ABataev wrote:
> Why it cannot be just `OMPD_unknown` here just like for `omp for` directive? Should it be outlined as a function?
I didn't write any codegen for this but my impression was that 'loop' can be treated like a 'parallel for' depending on the binding/situation and need outlining. That's why I did this. If that isn't the right assumption I can change it. 


================
Comment at: clang/lib/CodeGen/CGStmt.cpp:397
+  case Stmt::OMPGenericLoopDirectiveClass:
+    llvm_unreachable("codegen for loop directive not yet implemented");
   }
----------------
ABataev wrote:
> Better just to emit it as an inlined directive.
Not sure exactly what you mean by inlined, but if you have something trivial for me to add.  I wasn't planning to implement any codegen in this patch.


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

https://reviews.llvm.org/D112499



More information about the llvm-commits mailing list