Forcing llvm as intermediate for Link, CreateLib

Link and CreateLibrary will use llvm IR as
intermediate representation always

Change-Id: I370e92ee258d997f04f40320ab4a478970ee22bd
This commit is contained in:
Chodor, Jaroslaw
2018-07-29 00:47:55 +02:00
committed by sys_ocldev
parent ea92874a66
commit c5becf63f7
4 changed files with 22 additions and 11 deletions

View File

@@ -251,8 +251,7 @@ cl_int CompilerInterface::link(
CIF::RAII::UPtr_t<IGC::OclTranslationOutputTagOCL> currOut;
inSrc->Retain(); // shared with currSrc
CIF::RAII::UPtr_t<CIF::Builtins::BufferSimple> currSrc(inSrc.get());
auto intermediateRepresentation = getPreferredIntermediateRepresentation(device);
IGC::CodeType::CodeType_t translationChain[] = {IGC::CodeType::elf, intermediateRepresentation, IGC::CodeType::oclGenBin};
IGC::CodeType::CodeType_t translationChain[] = {IGC::CodeType::elf, IGC::CodeType::llvmBc, IGC::CodeType::oclGenBin};
constexpr size_t numTranslations = sizeof(translationChain) / sizeof(translationChain[0]);
for (size_t ti = 1; ti < numTranslations; ti++) {
IGC::CodeType::CodeType_t inType = translationChain[ti - 1];
@@ -297,7 +296,7 @@ cl_int CompilerInterface::createLibrary(
auto igcOptions = CIF::Builtins::CreateConstBuffer(igcMain.get(), inputArgs.pOptions, inputArgs.OptionsSize);
auto igcInternalOptions = CIF::Builtins::CreateConstBuffer(igcMain.get(), inputArgs.pInternalOptions, inputArgs.InternalOptionsSize);
auto intermediateRepresentation = getPreferredIntermediateRepresentation(device);
auto intermediateRepresentation = IGC::CodeType::llvmBc;
auto igcTranslationCtx = createIgcTranslationCtx(device, IGC::CodeType::elf, intermediateRepresentation);
auto igcOutput = translate(igcTranslationCtx.get(), igcSrc.get(),