[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 08:47:02 PDT 2020
pdhaliwal added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/HIP.cpp:389
- for (Arg *A : Args) {
- DAL->append(A);
+ if (DeviceOffloadKind != Action::OFK_OpenMP) {
+ for (Arg *A : Args) {
----------------
arsenm wrote:
> Needs a comment? I don't understand why openmp is any different here
`HostTC.TranslateArgs` (HostTC = Generic_GCC, Line#383) returns `DAL` which contains `Args` when offloadkind is OFK_OpenMP (for all other cases, it returns nullptr). Thus, Line#{390,391} is just duplicating the arguments which are propagating to the opt, llc, etc. commands.
Ref: https://clang.llvm.org/doxygen/Gnu_8cpp_source.html#l02966
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80996/new/
https://reviews.llvm.org/D80996
More information about the cfe-commits
mailing list