Adds basic parsing/sema/serialization support for the #pragma omp loop
directive.
Details
Diff Detail
Unit Tests
Event Timeline
Thanks for the review.
clang/lib/Basic/OpenMPKinds.cpp | ||
---|---|---|
683 | 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. | |
clang/lib/CodeGen/CGStmt.cpp | ||
397 | 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. |
clang/lib/Basic/OpenMPKinds.cpp | ||
---|---|---|
683 | Hmm, not sure if this is correct. Could you clarify a bit on the expected codegen for different kinds of bindings? Some examples in pseudocode, maybe? | |
clang/lib/CodeGen/CGStmt.cpp | ||
397 | I just meant that if we can emit the associated statement as is, better to do it. auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) { CGF.EmitStmt(S.getAssociatedStmt()); }; OMPLexicalScope Scope(*this, S, OMPD_unknown); CGM.getOpenMPRuntime().emitInlinedDirective(*this, OMPD_loop, CodeGen); or something like this. |
Added 'final' to OMPGenericLoopDirective.
Use OMPD_unknown for capture region at least temporarily.
Inline the underlying statement instead of assert in codegen.
Fix nesting check and added related test case.
clang/lib/Sema/SemaOpenMP.cpp | ||
---|---|---|
3911 | Here it should also be handled just like OMPD_simd or OMPD_for with TODO/FIXME. |
final