diff --git a/cmake/llvm-hash.txt b/cmake/llvm-hash.txt index 18b33a2a9f4c..f1ae20069d42 100644 --- a/cmake/llvm-hash.txt +++ b/cmake/llvm-hash.txt @@ -1 +1 @@ -2619c2ed584cdf3b38e6743ed3c785223f06e3f7 +0aa5ba43a0d11ce8e7f143380ae75fea516b6841 diff --git a/python/src/llvm.cc b/python/src/llvm.cc index c86bf671a7df..c596aa03aaeb 100644 --- a/python/src/llvm.cc +++ b/python/src/llvm.cc @@ -59,7 +59,7 @@ createTargetMachine(llvm::Module *module, std::string proc, opt.MCOptions.AsmVerbose = true; opt.MCOptions.PreserveAsmComments = true; std::unique_ptr machine{target->createTargetMachine( - module->getTargetTriple(), proc, features, opt, llvm::Reloc::PIC_, + module->getTargetTriple().str(), proc, features, opt, llvm::Reloc::PIC_, std::nullopt, disableLLVMOpt ? llvm::CodeGenOptLevel::None : llvm::CodeGenOptLevel::Aggressive)}; @@ -132,7 +132,7 @@ std::string translateLLVMIRToASM(llvm::Module &module, // module->print(llvm::outs(), nullptr); // create machine - module.setTargetTriple(triple); + module.setTargetTriple(Triple(triple)); auto machine = createTargetMachine(&module, proc, enable_fp_fusion, features); // set data layout module.setDataLayout(machine->createDataLayout()); @@ -277,8 +277,8 @@ void init_triton_llvm(py::module &&m) { llvm::TargetOptions opt; // Target machine is only used to create the data layout. std::unique_ptr machine{target->createTargetMachine( - triple, proc, features, opt, llvm::Reloc::PIC_, std::nullopt, - llvm::CodeGenOptLevel::None)}; + llvm::Triple(triple), proc, features, opt, llvm::Reloc::PIC_, + std::nullopt, llvm::CodeGenOptLevel::None)}; // set data layout mod->setDataLayout(machine->createDataLayout()); });