Silencing an MSVC warning: '<<' : result of 32-bit shift implicitly converted to...
[oota-llvm.git] / lib / Analysis / MemDerefPrinter.cpp
index 5b74f5c1fab396ebf089b96560819a713d6ceee5..5903dc567042e271957abcca93011cfe86e4e716 100644 (file)
@@ -10,6 +10,7 @@
 #include "llvm/Analysis/Passes.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/Analysis/MemoryDependenceAnalysis.h"
+#include "llvm/Analysis/ValueTracking.h"
 #include "llvm/IR/CallSite.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/InstIterator.h"
@@ -53,7 +54,7 @@ bool MemDerefPrinter::runOnFunction(Function &F) {
   for (auto &I: inst_range(F)) {
     if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
       Value *PO = LI->getPointerOperand();
-      if (PO->isDereferenceablePointer(&DL))
+      if (isDereferenceablePointer(PO, DL))
         Vec.push_back(PO);
     }
   }