mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-18 21:10:35 +02:00
clover: Use Legacy PassManager for LLVM trunk (3.7)
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Shawn Starr <shawn.starr@rogers.com>
This commit is contained in:
parent
8323796840
commit
7df256add2
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue