diff options
author | Tom Stellard <[email protected]> | 2018-07-20 19:54:56 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-07-23 20:23:48 -0400 |
commit | 0866edede0116e33b4bed28737e4d242ad0da2ad (patch) | |
tree | 8da9f3af24c019124ccb95302b52364082b3ce76 /src/amd/common/ac_llvm_helper.cpp | |
parent | 820d5e51b7060f02d6c12fbb1c349111022ff37a (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.cpp | 7 |
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 +} |