[DRIVER] LLVM driver fixup (#482)
Current way of doing things is probably not super thread safe. init is shared between threads and some threads my not call the LLVMInitialize* function.
This commit is contained in:
@@ -70,8 +70,6 @@ namespace triton{
|
||||
namespace driver{
|
||||
|
||||
void init_llvm() {
|
||||
static bool init = false;
|
||||
if(!init){
|
||||
LLVMInitializeNVPTXTargetInfo();
|
||||
LLVMInitializeNVPTXTarget();
|
||||
LLVMInitializeNVPTXTargetMC();
|
||||
@@ -80,8 +78,6 @@ void init_llvm() {
|
||||
LLVMInitializeAMDGPUTarget();
|
||||
LLVMInitializeAMDGPUTargetMC();
|
||||
LLVMInitializeAMDGPUAsmPrinter();
|
||||
init = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -169,8 +165,6 @@ std::string llir_to_ptx(llvm::Module* module, int cc, int version){
|
||||
// verify and store llvm
|
||||
llvm::legacy::PassManager pm;
|
||||
pm.add(llvm::createVerifierPass());
|
||||
// pm.add(llvm::createDeadCodeEliminationPass());
|
||||
// pm.add(llvm::createEarlyCSEPass());
|
||||
pm.run(*module);
|
||||
// module->print(llvm::outs(), nullptr);
|
||||
|
||||
|
Reference in New Issue
Block a user