summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/common/ac_llvm_helper.cpp')
-rw-r--r--src/amd/common/ac_llvm_helper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp
index 4348ebd36ee..e0943135fad 100644
--- a/src/amd/common/ac_llvm_helper.cpp
+++ b/src/amd/common/ac_llvm_helper.cpp
@@ -36,6 +36,7 @@
#include <llvm/Target/TargetMachine.h>
#include <llvm/IR/IRBuilder.h>
#include <llvm/Analysis/TargetLibraryInfo.h>
+#include <llvm/Transforms/IPO.h>
#include <llvm/IR/LegacyPassManager.h>
#if HAVE_LLVM < 0x0700
@@ -165,3 +166,8 @@ bool ac_compile_module_to_binary(struct ac_compiler_passes *p, LLVMModuleRef mod
fprintf(stderr, "amd: cannot read an ELF shader binary\n");
return success;
}
+
+void ac_llvm_add_barrier_noop_pass(LLVMPassManagerRef passmgr)
+{
+ llvm::unwrap(passmgr)->add(llvm::createBarrierNoopPass());
+}