Move CompilerInterface to ExecutionEnvironment

Change-Id: I14afdd8fc41ecd4ac8c8fcbeecda2539bc847288
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-08-01 09:06:46 +02:00
committed by sys_ocldev
parent 931b462ee1
commit d2759a0629
18 changed files with 114 additions and 190 deletions

View File

@@ -22,6 +22,7 @@
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/command_stream/command_stream_receiver.h"
#include "runtime/compiler_interface/compiler_interface.h"
#include "runtime/source_level_debugger/source_level_debugger.h"
#include "runtime/built_ins/sip.h"
#include "runtime/gmm_helper/gmm_helper.h"
@@ -76,4 +77,13 @@ void ExecutionEnvironment::initSourceLevelDebugger(const HardwareInfo &hwInfo) {
GmmHelper *ExecutionEnvironment::getGmmHelper() const {
return gmmHelper.get();
}
CompilerInterface *ExecutionEnvironment::getCompilerInterface() {
if (this->compilerInterface.get() == nullptr) {
std::lock_guard<std::mutex> autolock(this->mtx);
if (this->compilerInterface.get() == nullptr) {
this->compilerInterface.reset(CompilerInterface::createInstance());
}
}
return this->compilerInterface.get();
}
} // namespace OCLRT