mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Allow to load llvm bc.
Change-Id: Ibdffafe48d42072536d8b185e74c77489686f728 Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
a2e1389ff9
commit
4ee44586b5
@@ -130,7 +130,8 @@ int OfflineCompiler::buildSourceCode() {
|
||||
bool inputIsIntermediateRepresentation = inputFileLlvm || inputFileSpirV;
|
||||
if (false == inputIsIntermediateRepresentation) {
|
||||
UNRECOVERABLE_IF(fclDeviceCtx == nullptr);
|
||||
IGC::CodeType::CodeType_t intermediateRepresentation = useLlvmText ? IGC::CodeType::llvmLl : preferredIntermediateRepresentation;
|
||||
IGC::CodeType::CodeType_t intermediateRepresentation = useLlvmText ? IGC::CodeType::llvmLl
|
||||
: (useLlvmBc ? IGC::CodeType::llvmBc : preferredIntermediateRepresentation);
|
||||
// sourceCode.size() returns the number of characters without null terminated char
|
||||
auto fclSrc = CIF::Builtins::CreateConstBuffer(fclMain.get(), sourceCode.c_str(), sourceCode.size() + 1);
|
||||
auto fclOptions = CIF::Builtins::CreateConstBuffer(fclMain.get(), options.c_str(), options.size());
|
||||
@@ -489,6 +490,8 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
|
||||
argIndex++;
|
||||
} else if (stringsAreEqual(argv[argIndex], "-llvm_text")) {
|
||||
useLlvmText = true;
|
||||
} else if (stringsAreEqual(argv[argIndex], "-llvm_bc")) {
|
||||
useLlvmBc = true;
|
||||
} else if (stringsAreEqual(argv[argIndex], "-llvm_input")) {
|
||||
inputFileLlvm = true;
|
||||
} else if (stringsAreEqual(argv[argIndex], "-spirv_input")) {
|
||||
|
||||
@@ -89,6 +89,7 @@ class OfflineCompiler {
|
||||
std::string buildLog;
|
||||
|
||||
bool useLlvmText = false;
|
||||
bool useLlvmBc = false;
|
||||
bool useCppFile = false;
|
||||
bool useOptionsSuffix = false;
|
||||
bool quiet = false;
|
||||
|
||||
Reference in New Issue
Block a user