r335774 - [HIP] Fix ordering of device-libs linking
Aaron Enye Shi via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 27 12:51:42 PDT 2018
Author: aaronenyeshi
Date: Wed Jun 27 12:51:42 2018
New Revision: 335774
URL: http://llvm.org/viewvc/llvm-project?rev=335774&view=rev
Log:
[HIP] Fix ordering of device-libs linking
Summary:
HIP should link the bitcodes with caller functions before callee functions. Also added lit test to check the ordering of the linked bitcodes is matches.
Reviewers: yaxunl, b-sumner
Reviewed By: yaxunl, b-sumner
Subscribers: cfe-commits, yaxunl, b-sumner, scchan
Differential Revision: https://reviews.llvm.org/D48667
Modified:
cfe/trunk/lib/Driver/ToolChains/HIP.cpp
cfe/trunk/test/Driver/hip-device-libs.hip
Modified: cfe/trunk/lib/Driver/ToolChains/HIP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/HIP.cpp?rev=335774&r1=335773&r2=335774&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/HIP.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/HIP.cpp Wed Jun 27 12:51:42 2018
@@ -82,7 +82,7 @@ const char *AMDGCN::Linker::constructLLV
FlushDenormalControlBC = "oclc_daz_opt_off.amdgcn.bc";
BCLibs.append({"opencl.amdgcn.bc",
- "ockl.amdgcn.bc", "irif.amdgcn.bc", "ocml.amdgcn.bc",
+ "ocml.amdgcn.bc", "ockl.amdgcn.bc", "irif.amdgcn.bc",
"oclc_finite_only_off.amdgcn.bc",
FlushDenormalControlBC,
"oclc_correctly_rounded_sqrt_on.amdgcn.bc",
Modified: cfe/trunk/test/Driver/hip-device-libs.hip
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hip-device-libs.hip?rev=335774&r1=335773&r2=335774&view=diff
==============================================================================
--- cfe/trunk/test/Driver/hip-device-libs.hip (original)
+++ cfe/trunk/test/Driver/hip-device-libs.hip Wed Jun 27 12:51:42 2018
@@ -21,6 +21,7 @@
// COM: [[LLVM_LINK:"*.llvm-link"]]
+// COM-SAME: {{.*}} "{{.*}}ocml.amdgcn.bc" "{{.*}}ockl.amdgcn.bc" "{{.*}}irif.amdgcn.bc"
// FLUSHD-SAME: {{.*}} "{{.*}}oclc_daz_opt_on.amdgcn.bc"
// NOFLUSHD-SAME: {{.*}} "{{.*}}oclc_daz_opt_off.amdgcn.bc"
// COM-SAME: {{.*}} "-o" "{{.*}}-gfx900-linked-{{.*bc}}"
More information about the cfe-commits
mailing list