diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt index 7aedbb11dafb..92dcb07a433f 100644 --- a/polly/lib/CMakeLists.txt +++ b/polly/lib/CMakeLists.txt @@ -142,6 +142,7 @@ if (BUILD_SHARED_LIBS) LLVMTransformUtils LLVMAnalysis LLVMipo + LLVMMC ) link_directories( ${LLVM_LIBRARY_DIR} diff --git a/polly/lib/CodeGen/PTXGenerator.cpp b/polly/lib/CodeGen/PTXGenerator.cpp index 987aee004b3f..e2432b5515f9 100644 --- a/polly/lib/CodeGen/PTXGenerator.cpp +++ b/polly/lib/CodeGen/PTXGenerator.cpp @@ -20,6 +20,7 @@ #include "llvm/IR/LegacyPassManager.h" #include "llvm/ADT/SetVector.h" #include "llvm/Analysis/TargetLibraryInfo.h" +#include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/TargetRegistry.h" @@ -559,11 +560,10 @@ static bool createASMAsString(Module *New, const StringRef &Triple, TargetMachine &Target = *target.get(); // Build up all of the passes that we want to do to the module. - PassManager PM; + llvm::legacy::PassManager PM; PM.add(new TargetLibraryInfoWrapperPass(TheTriple)); - PM.add(new DataLayoutPass(*Target.getDataLayout())); - Target.addAnalysisPasses(PM); + PM.add(createTargetTransformInfoWrapperPass(Target.getTargetIRAnalysis())); { raw_string_ostream NameROS(ASM);