[PATCH] D80996: [AMDGPU][OpenMP] Fix duplicate copies of arguments in commands
Pushpinder Singh via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 05:31:22 PDT 2020
pdhaliwal created this revision.
pdhaliwal added reviewers: yaxunl, msearles, sameerds.
Herald added subscribers: cfe-commits, sstefan1, guansong, t-tye, tpr, dstuttard, wdng, kzhuravl.
Herald added a reviewer: jdoerfert.
Herald added a project: clang.
When offloading kind is OFK_OpenMP, the host toolchain (Generic_GCC)
returns DerivedArgList which copies input arguments along with few
other arguments. HIPToolchain again copies input arguments to the
same DerivedArgList.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80996
Files:
clang/lib/Driver/ToolChains/HIP.cpp
Index: clang/lib/Driver/ToolChains/HIP.cpp
===================================================================
--- clang/lib/Driver/ToolChains/HIP.cpp
+++ clang/lib/Driver/ToolChains/HIP.cpp
@@ -386,8 +386,10 @@
const OptTable &Opts = getDriver().getOpts();
- for (Arg *A : Args) {
- DAL->append(A);
+ if (DeviceOffloadKind != Action::OFK_OpenMP) {
+ for (Arg *A : Args) {
+ DAL->append(A);
+ }
}
if (!BoundArch.empty()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80996.267855.patch
Type: text/x-patch
Size: 454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200602/6c165851/attachment.bin>
More information about the cfe-commits
mailing list