Mesa (master): clover: Use Legacy PassManager for LLVM trunk (3.7)

Tom Stellard tstellar at kemper.freedesktop.org
Sat Feb 14 02:38:26 UTC 2015


Module: Mesa
Branch: master
Commit: 7df256add2ae9fb916c3e0f80c879e42d1c8a7a0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7df256add2ae9fb916c3e0f80c879e42d1c8a7a0

Author: Shawn Starr <shawn.starr at rogers.com>
Date:   Fri Feb 13 21:16:17 2015 -0500

clover: Use Legacy PassManager for LLVM trunk (3.7)

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Signed-off-by: Shawn Starr <shawn.starr at rogers.com>

---

 src/gallium/state_trackers/clover/llvm/invocation.cpp |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 0794e61..508979a 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -44,7 +44,11 @@
 #if HAVE_LLVM < 0x0305
 #include <llvm/ADT/OwningPtr.h>
 #endif
+#if HAVE_LLVM >= 0x0307
+#include <llvm/IR/LegacyPassManager.h>
+#else
 #include <llvm/PassManager.h>
+#endif
 #include <llvm/Support/CodeGen.h>
 #include <llvm/Support/TargetSelect.h>
 #include <llvm/Support/MemoryBuffer.h>
@@ -298,7 +302,12 @@ namespace {
    optimize(llvm::Module *mod, unsigned optimization_level,
             const std::vector<llvm::Function *> &kernels) {
 
+#if HAVE_LLVM >= 0x0307
+      llvm::legacy::PassManager PM;
+#else
       llvm::PassManager PM;
+#endif
+
       // Add a function internalizer pass.
       //
       // By default, the function internalizer pass will look for a function




More information about the mesa-commit mailing list