Update PTX generator to latest LLVM changes
authorTobias Grosser <tobias@grosser.es>
Mon, 9 Mar 2015 13:35:19 +0000 (13:35 +0000)
committerTobias Grosser <tobias@grosser.es>
Mon, 9 Mar 2015 13:35:19 +0000 (13:35 +0000)
llvm-svn: 231652

polly/lib/CMakeLists.txt
polly/lib/CodeGen/PTXGenerator.cpp

index 7aedbb1..92dcb07 100644 (file)
@@ -142,6 +142,7 @@ if (BUILD_SHARED_LIBS)
     LLVMTransformUtils
     LLVMAnalysis
     LLVMipo
+    LLVMMC
   )
   link_directories(
     ${LLVM_LIBRARY_DIR}
index 987aee0..e2432b5 100644 (file)
@@ -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);