[PATCH] D154180: [OPENMP52] Codegen support for doacross clause.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 30 13:48:38 PDT 2023
ABataev added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11401-11402
llvm::Value *Args[] = {
- emitUpdateLocation(CGF, C->getBeginLoc()),
- getThreadID(CGF, C->getBeginLoc()),
+ RT.emitUpdateLocation(CGF, C->getBeginLoc()),
+ RT.getThreadID(CGF, C->getBeginLoc()),
CGF.Builder.CreateConstArrayGEP(CntAddr, 0).getPointer()};
----------------
RT is needed only for loc and tid, you can preemit them in the member functions and pass here instead of emitting them here and expose private interfaces.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11422-11428
+ const OMPDependClause *CL) {
+ return EmitDoacrossOrdered<OMPDependClause>(*this, CGF, CGM, CL);
+}
+
+void CGOpenMPRuntime::emitDoacrossOrdered(CodeGenFunction &CGF,
+ const OMPDoacrossClause *CL) {
+ return EmitDoacrossOrdered<OMPDoacrossClause>(*this, CGF, CGM, CL);
----------------
Use Cl or just C instead of CL.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:1650-1660
+
+ /// Gets thread id value for the current thread.
+ ///
+ llvm::Value *getThreadID(CodeGenFunction &CGF, SourceLocation Loc);
+
+ /// Emits object of ident_t type with info for source location.
+ /// \param Flags Flags for OpenMP location.
----------------
Why these declarations are moved?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154180/new/
https://reviews.llvm.org/D154180
More information about the cfe-commits
mailing list