[PATCH] D81483: [Clang][OpenMP][OMPBuilder] (3/4) Privatize `parallel` for `OMPBuilder`
Fady Ghanim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 10:25:33 PDT 2020
fghanim created this revision.
fghanim added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, aaron.ballman, sstefan1, guansong, yaxunl.
Herald added a project: clang.
fghanim added a child revision: D79677: [clang][OpenMP][OMPIRBuilder] Adding some Privatization clauses to OpenMP `parallel` Directive.
fghanim added a parent revision: D79676: [Clang][OpenMP][OMPBuilder] Moving OMP allocation and cache creation code to OMPBuilderCBHelpers.
fghanim marked 3 inline comments as done.
fghanim added inline comments.
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1554
llvm::SmallVectorImpl<llvm::Value *> &) {}
+bool CodeGenFunction::OMPBuilderCBHelpers::EmitOMPCopyinClause(
----------------
Note to reviewers:
This keeps most of old implementation of `copyin` clause, except it uses part of the `OMPBuilder` now. Changes are noted below.
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1582
+ assert(CGF.CapturedStmtInfo->lookup(VD) &&
+ "Copyin threadprivates should have been captured!");
+ const auto *VDCanon = VD->getCanonicalDecl();
----------------
added following few lines
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1600
+ }
+
+ // Get the address of the threadprivate variable.
----------------
Wherever needed - changed the following section to use `OMPBuilder`
Adding support / implementation for `copyin` in OMPBuilder's
implementation of `omp parallel`
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81483
Files:
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/OpenMP/parallel_copyin_codegen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81483.269587.patch
Type: text/x-patch
Size: 27174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200609/70cca144/attachment-0001.bin>
More information about the cfe-commits
mailing list