From 3f66d556866de8c59cd44e06afdba1b0c8948739 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 7 Sep 2016 05:29:23 -0400
Subject: [PATCH] P4 to Git Change 1311624 by nhaustov@nhaustov_hsa on
2016/09/07 05:22:23
SWDEV-101272 - Remove call to OptimizeLLVMBitcode.
It's no longer needed after LLVM fix https://reviews.llvm.org/D24023 .
Reviewed by: Laurent Morichetti, German Andryeyev.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#26 edit
[ROCm/clr commit: 6a5ec3a6b09b14147526ea97fd4fb44d9d2f63c3]
---
.../rocclr/runtime/device/rocm/rocprogram.cpp | 33 +------------------
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp b/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp
index a3188246ae..66fae6e6d0 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp
@@ -914,42 +914,11 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options)
}
}
- // open the optimized output
- Buffer* opt_bc = C->NewBuffer(DT_LLVM_BC);
-
- if (!opt_bc) {
- buildLog_ += "Error: Failed to open the optimized program.\n";
- return false;
- }
-
std::ostringstream optLevel;
optLevel << "-O" << options->oVariables->OptLevel;
- std::vector optOptions;
- optOptions.push_back(optLevel.str());
- optOptions.push_back("-strip");
- optOptions.push_back("-instcombine");
- optOptions.push_back("-always-inline");
-
- ret = C->OptimizeLLVMBitcode(linked_bc, opt_bc, optOptions);
- buildLog_ += C->Output();
- if (!ret) {
- buildLog_ += "Error: Optimizing bitcode failed: linking source & IR libraries.\n";
- return false;
- }
-
- if (options->isDumpFlagSet(amd::option::DUMP_BC_OPTIMIZED)) {
- std::ofstream f(options->getDumpFileName("_optimized.bc").c_str(), std::ios::trunc);
- if(f.is_open()) {
- f.write(opt_bc->Buf().data(), opt_bc->Size());
- } else {
- buildLog_ +=
- "Warning: opening the file to dump the optimized IR failed.\n";
- }
- }
-
inputs.clear();
- inputs.push_back(opt_bc);
+ inputs.push_back(linked_bc);
Buffer* out_exec = C->NewBuffer(DT_EXECUTABLE);
if (!out_exec) {