Fix various issues (or do cleanups) found by enabling certain MSVC warnings.
[oota-llvm.git] / lib / Transforms / Scalar / MemCpyOptimizer.cpp
index 6c6db60cc3eb9c20c2f094992c808e1c9b0accfd..a87cce3f9d3eda7dee5573979a3c19754c13c98a 100644 (file)
@@ -147,7 +147,7 @@ struct MemsetRange {
 } // end anon namespace
 
 bool MemsetRange::isProfitableToUseMemset(const TargetData &TD) const {
-  // If we found more than 8 stores to merge or 64 bytes, use memset.
+  // If we found more than 4 stores to merge or 16 bytes, use memset.
   if (TheStores.size() >= 4 || End-Start >= 16) return true;
 
   // If there is nothing to merge, don't do anything.
@@ -816,9 +816,8 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) {
       }
     }
   }
-  
-  AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
-  AliasAnalysis::Location SrcLoc = AA.getLocationForSource(M);
+
+  AliasAnalysis::Location SrcLoc = AliasAnalysis::getLocationForSource(M);
   MemDepResult SrcDepInfo = MD->getPointerDependencyFrom(SrcLoc, true,
                                                          M, M->getParent());
   if (SrcDepInfo.isClobber()) {