P4 to Git Change 1307201 by lmoriche@lmoriche_opencl_dev on 2016/08/25 12:44:28

SWDEV-1307193 - Back out changelist 1307198

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#14 edit
Esse commit está contido em:
foreman
2016-08-25 12:00:21 -05:00
commit 8539fc5c2e
+4 -27
Ver Arquivo
@@ -833,32 +833,8 @@ namespace roc {
return false;
}
// open the optimized output
Data* 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<std::string> 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;
}
inputs.clear();
inputs.push_back(opt_bc);
inputs.push_back(linked_bc);
Buffer* out_exec = C->NewBuffer(DT_EXECUTABLE);
if (!out_exec) {
@@ -872,8 +848,9 @@ namespace roc {
optionsstr.append(" -mcpu=");
optionsstr.append(dev().deviceInfo().machineTarget_);
// Set the -O#
optionsstr.append(" ").append(optLevel.str());
std::ostringstream optLevel;
optLevel << " -O" << options->oVariables->OptLevel;
optionsstr.append(optLevel.str());
// Tokenize the options string into a vector of strings
std::istringstream strstr(optionsstr);