radeonsi: Add debug option to enable LLVM GlobalISel (v2)
[mesa.git] / src / amd / common / ac_llvm_helper.cpp
index e0943135faddabaf73003c984323a9d1cf3f94a1..a4b2fde786a6be6abcfb438413e0f64b13be886e 100644 (file)
@@ -171,3 +171,10 @@ void ac_llvm_add_barrier_noop_pass(LLVMPassManagerRef passmgr)
 {
        llvm::unwrap(passmgr)->add(llvm::createBarrierNoopPass());
 }
+
+void ac_enable_global_isel(LLVMTargetMachineRef tm)
+{
+#if HAVE_LLVM >= 0x0700
+  reinterpret_cast<llvm::TargetMachine*>(tm)->setGlobalISel(true);
+#endif
+}