[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-17 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: clang/test/Driver/hip-toolchain-no-rdc.hip:164 +// LKONLY-NOT: llvm-link +// LKONLY-NOT: opt +// LKONLY-NOT: llc yaxunl wrote: > arsenm wrote: > > yamauchi wrote: > > > Hi, this test seems to fail for me because I happe

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/Driver/hip-toolchain-no-rdc.hip:164 +// LKONLY-NOT: llvm-link +// LKONLY-NOT: opt +// LKONLY-NOT: llc arsenm wrote: > yamauchi wrote: > > Hi, this test seems to fail for

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/test/Driver/hip-toolchain-no-rdc.hip:164 +// LKONLY-NOT: llvm-link +// LKONLY-NOT: opt +// LKONLY-NOT: llc yamauchi wrote: > Hi, this test seems to fail for me because I happen to have the string "opt" > in the "In

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-16 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added inline comments. Comment at: clang/test/Driver/hip-toolchain-no-rdc.hip:164 +// LKONLY-NOT: llvm-link +// LKONLY-NOT: opt +// LKONLY-NOT: llc Hi, this test seems to fail for me because I happen to have the string "opt" in the "InstallDir" file pat

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6752786d657a: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D81861?vs=270836&id=270933#toc Repo

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81861/new/ https://reviews.llvm.org/D81861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Aaron Enye Shi via Phabricator via cfe-commits
ashi1 accepted this revision. ashi1 added a comment. This revision is now accepted and ready to land. LGTM, ready to submit if @tra and @arsenm are okay with this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81861/new/ https://reviews.llvm.org/D81861 _

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 270836. yaxunl marked 3 inline comments as done. yaxunl added a comment. fix tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81861/new/ https://reviews.llvm.org/D81861 Files: clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/AMDGPU.h

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/test/Driver/hip-phases.hip:253 +// L2-DAG: [[P0:[0-9]+]]: input, "{{.*}}obj1.o", object, (host-[[T:hip]]) +// RL2-DAG: [[P1:[0-9]+]]: clang-offload-unbundler, {[[P0]]}, object, (host-[[T:hip

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 5 inline comments as done. yaxunl added inline comments. Comment at: clang/test/Driver/hip-phases.hip:34 +// RDC-DAG: [[P6:[0-9]+]]: backend, {[[P5]]}, ir, (device-[[T]], [[ARCH]]) +// RDC-DAG: [[P10:[0-9]+]]: linker, {[[P6]]}, image, (device-hip, [[ARCH]]) --

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 270825. yaxunl added a reviewer: arsenm. yaxunl added a comment. Herald added a subscriber: wdng. use -mcpu instead of march in HIP toolchain. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81861/new/ https://reviews.llvm.org/D81861 Files: clang/li

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:207-209 + Arg *A = Args.getLastArg(options::OPT_march_EQ); + if (!A) +A = Args.getLastArg(options::OPT_mcpu_EQ); arsenm wrote: > Wh

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Aaron Enye Shi via Phabricator via cfe-commits
ashi1 added a comment. Thank you for this patch, it looks good, and I have a few minor questions/comments. Comment at: clang/test/Driver/hip-phases.hip:34 +// RDC-DAG: [[P6:[0-9]+]]: backend, {[[P5]]}, ir, (device-[[T]], [[ARCH]]) +// RDC-DAG: [[P10:[0-9]+]]: linker, {[[P6]]},

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Thanks for doing this, this has been sorely needed since forever. We also really need to switch opencl over to this Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:207-209 + Arg *A = Args.getLastArg(options::OPT_march_EQ); + if (!A) +A = Ar

[PATCH] D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc

2020-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, ashi1. Herald added subscribers: kerbowa, dexonsmith, nhaehnle, jvesely. This patch is a follow up on https://reviews.llvm.org/D81627. In addition to default -fno-gpu-rdc case, this patches let HIP toolchain not use llvm-link/opt/llc to l