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
Tento commit je obsažen v:
foreman
2015-09-17 11:56:58 -04:00
rodič bc5a50bf7b
revize 2716079dd9
2 změnil soubory, kde provedl 0 přidání a 91 odebrání
-86
Zobrazit soubor
@@ -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<device::Kernel*>
(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<char *>(const_cast<void*>
(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()
{
-5
Zobrazit soubor
@@ -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;}
};