Commit 21bf9839 by wfu Committed by Tianqi Chen

[llvm] fixed issue with llvm 5 vs 6 (#1167)

parent 07f12239
...@@ -200,8 +200,13 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) { ...@@ -200,8 +200,13 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
dest_ll.SetUnbuffered(); dest_ll.SetUnbuffered();
destAsm.SetUnbuffered(); destAsm.SetUnbuffered();
module->print(dest_ll, nullptr); module->print(dest_ll, nullptr);
#if TVM_LLVM_VERSION <= 60
std::unique_ptr<llvm::Module> mAsm = llvm::CloneModule(module.get()); std::unique_ptr<llvm::Module> mAsm = llvm::CloneModule(module.get());
std::unique_ptr<llvm::Module> mObj = llvm::CloneModule(module.get()); std::unique_ptr<llvm::Module> mObj = llvm::CloneModule(module.get());
#else
std::unique_ptr<llvm::Module> mAsm = llvm::CloneModule(*module.get());
std::unique_ptr<llvm::Module> mObj = llvm::CloneModule(*module.get());
#endif
llvm::legacy::PassManager pass; llvm::legacy::PassManager pass;
CHECK(tm->addPassesToEmitFile( CHECK(tm->addPassesToEmitFile(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment