summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_helper.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2018-07-20 19:54:56 +0200
committerMarek Olšák <[email protected]>2018-07-23 20:23:48 -0400
commit0866edede0116e33b4bed28737e4d242ad0da2ad (patch)
tree8da9f3af24c019124ccb95302b52364082b3ce76 /src/amd/common/ac_llvm_helper.cpp
parent820d5e51b7060f02d6c12fbb1c349111022ff37a (diff)
radeonsi: Add debug option to enable LLVM GlobalISel (v2)
R600_DEBUG=gisel will tell LLVM to use GlobalISel rather than SelectionDAG for instruction selection. v2: mareko: move the helper to src/amd/common Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_helper.cpp')
-rw-r--r--src/amd/common/ac_llvm_helper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp
index e0943135fad..a4b2fde786a 100644
--- a/src/amd/common/ac_llvm_helper.cpp
+++ b/src/amd/common/ac_llvm_helper.cpp
@@ -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
+}