]> granicus.if.org Git - clang/commit
[HIP] Fix unbundling
authorYaxun Liu <Yaxun.Liu@amd.com>
Wed, 6 Jun 2018 19:44:10 +0000 (19:44 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Wed, 6 Jun 2018 19:44:10 +0000 (19:44 +0000)
commit7b0693d79162eca545845a8b2a82143ae955c1df
tree773d8d2bbc29c1968142c935af9bd310bf90b214
parent318f522d0cf2e6ddb5beee84886ed3792cdbbdda
[HIP] Fix unbundling

HIP uses clang-offload-bundler to bundle intermediate files for host
and different gpu archs together. When a file is unbundled,
clang-offload-bundler should be called only once, and the objects
for host and different gpu archs should be passed to the next
jobs. This is because Driver maintains CachedResults which maps
triple-arch string to output files for each job.

This patch fixes a bug in Driver::BuildJobsForActionNoCache which
uses incorrect key for CachedResults for HIP which causes
clang-offload-bundler being called mutiple times and incorrect
output files being used.

It only affects HIP.

Differential Revision: https://reviews.llvm.org/D47555

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334128 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Driver.cpp
test/Driver/hip-binding.hip [new file with mode: 0644]