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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/ToolChains/HIP.cpp | ||
---|---|---|
389–392 | Needs a comment? I don't understand why openmp is any different here |
clang/lib/Driver/ToolChains/HIP.cpp | ||
---|---|---|
389–392 | 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. |
clang/lib/Driver/ToolChains/HIP.cpp | ||
---|---|---|
389–392 | I think @arsenm was asking for a comment in the code itself. Also, I am not sufficiently familiar with the design here, but why is the HIP driver checking for OpenMP offloading? Is the offloaded region treated as HIP code? It seems a bit strange that we are mixing two different things in the same driver. |
Needs a comment? I don't understand why openmp is any different here