From 2716079dd97cc461b37baeb79c1e6973ca8ce4c0 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 17 Sep 2015 11:56:58 -0400
Subject: [PATCH] P4 to Git Change 1191702 by gandryey@gera-dev-w7 on
2015/09/17 11:42:51
ECR #304775 - Remove EG/NI support
- Remove buildNoOpt() method
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#67 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#32 edit
---
rocclr/runtime/platform/program.cpp | 86 -----------------------------
rocclr/runtime/platform/program.hpp | 5 --
2 files changed, 91 deletions(-)
diff --git a/rocclr/runtime/platform/program.cpp b/rocclr/runtime/platform/program.cpp
index 08cd81d341..bec2e95b82 100644
--- a/rocclr/runtime/platform/program.cpp
+++ b/rocclr/runtime/platform/program.cpp
@@ -526,92 +526,6 @@ Program::build(
return retval;
}
-bool
-Program::buildNoOpt(const Device& device, const std::string& kernelName)
-{
- ScopedLock sl(buildLock_);
- // Don't allow multiple builds of program without optimizations
- if (!firstBuildNoOpt_) {
- return false;
- }
- firstBuildNoOpt_ = false;
-
- symbols_t::const_iterator it = symbolTable_->find(kernelName);
- assert((it != symbolTable_->end()) && "Kernel must be valid at this time");
- const Symbol& progSymbol = it->second;
-
- // Check if program already has unoptimized kernel
- device::Kernel* devKernel = const_cast
- (progSymbol.getDeviceKernel(device, false));
- if (devKernel != NULL) {
- return true;
- }
-
- // Find the original program for build options string
- deviceprograms_t::const_iterator pit = devicePrograms_.find(&device);
- assert((pit != devicePrograms_.end()) && "Program must be valid at this time");
- device::Program* orgProgram = pit->second;
-
- // Process build options.
- option::Options parsedOptions;
- std::string cppstr(orgProgram->compileOptions());
- if (AMD_OCL_BUILD_OPTIONS != NULL) {
- // Override options.
- cppstr = AMD_OCL_BUILD_OPTIONS;
- }
- if (!Device::appProfile()->GetBuildOptsAppend().empty()) {
- cppstr.append(" ");
- cppstr.append(Device::appProfile()->GetBuildOptsAppend());
- }
- if (AMD_OCL_BUILD_OPTIONS_APPEND != NULL) {
- cppstr.append(" ");
- cppstr.append(AMD_OCL_BUILD_OPTIONS_APPEND);
- }
-
- if (!option::parseAllOptions(cppstr, parsedOptions)) {
- return false;
- }
- parsedOptions.optionsLog();
-
- parsedOptions.oVariables->AssumeAlias = true;
- parsedOptions.oVariables->ForceLLVM = true;
-
- // Find the program without optimizaiton
- pit = devProgramsNoOpt_.find(&device);
-
- // Update the symbol table
- if (pit != devProgramsNoOpt_.end()) {
- device::Program& program = *pit->second;
- const device::Program::binary_t& progBinary = orgProgram->binary();
-
- if (!program.setBinary(reinterpret_cast(const_cast
- (progBinary.first)), progBinary.second)) {
- return false;
- }
-
- // Force recompilation from the binary only
- if (CL_SUCCESS != program.build("", orgProgram->compileOptions().c_str(),
- &parsedOptions)) {
- return false;
- }
-
- const device::Program::kernels_t& kernels = program.kernels();
- device::Program::kernels_t::const_iterator kit;
- for (kit = kernels.begin(); kit != kernels.end(); ++kit) {
- const std::string& name = kit->first;
- const device::Kernel* devKernel = kit->second;
-
- symbols_t::iterator sit = symbolTable_->find(name);
- Symbol& symbol = sit->second;
- if (!symbol.setDeviceKernel(device, devKernel, false)) {
- return false;
- }
- }
- }
-
- return true;
-}
-
void
Program::clear()
{
diff --git a/rocclr/runtime/platform/program.hpp b/rocclr/runtime/platform/program.hpp
index 9d8e5c0f63..9db4eaed5c 100644
--- a/rocclr/runtime/platform/program.hpp
+++ b/rocclr/runtime/platform/program.hpp
@@ -92,7 +92,6 @@ private:
devicelist_t deviceList_;
std::string programLog_; //!< Log for parsing options, etc.
- bool firstBuildNoOpt_; //!< Build program without optimizations
protected:
//! Destroy this program.
@@ -112,7 +111,6 @@ public:
, isIL_(isIL)
, symbolTable_(NULL)
, programLog_()
- , firstBuildNoOpt_(true)
{ }
//! Construct a new program associated with a context.
@@ -187,9 +185,6 @@ public:
void* data = NULL,
bool optionChangable = true);
- //! Build the program for the given devices without noalias optimization
- bool buildNoOpt(const Device& device, const std::string& kernelName);
-
//! RTTI internal implementation
virtual ObjectType objectType() const {return ObjectTypeProgram;}
};