summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeon/radeon_llvm_emit.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
index 89130b33157..eef55a8e93a 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
@@ -35,6 +35,7 @@
#include <llvm/Support/SourceMgr.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
+#include <llvm/Support/Threading.h>
#include <llvm/Target/TargetData.h>
#include <llvm/Target/TargetMachine.h>
@@ -57,6 +58,20 @@ void LLVMInitializeAMDGPUTargetInfo(void);
}
#endif
+namespace {
+
+class LLVMEnsureMultithreaded {
+public:
+ LLVMEnsureMultithreaded()
+ {
+ llvm_start_multithreaded();
+ }
+};
+
+static LLVMEnsureMultithreaded lLVMEnsureMultithreaded;
+
+}
+
/**
* Compile an LLVM module to machine code.
*