Convert a few more backedge-taken count functions to use BackedgeTakenInfo.
[oota-llvm.git] / lib / Analysis / AliasSetTracker.cpp
index 652ec3b5dd3ccaa97f6d6956b10739d085d5e7e6..02aff50d8a13a3738c87ead43caf915743c5d8df 100644 (file)
 
 #include "llvm/Analysis/AliasSetTracker.h"
 #include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/Analysis/MemoryBuiltins.h"
 #include "llvm/Instructions.h"
 #include "llvm/IntrinsicInst.h"
 #include "llvm/Pass.h"
 #include "llvm/Type.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Assembly/Writer.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/InstIterator.h"
 #include "llvm/Support/Format.h"
@@ -154,9 +154,6 @@ bool AliasSet::aliasesPointer(const Value *Ptr, unsigned Size,
 
   // Check the call sites list and invoke list...
   if (!CallSites.empty()) {
-    if (AA.hasNoModRefInfoForCalls())
-      return true;
-
     for (unsigned i = 0, e = CallSites.size(); i != e; ++i)
       if (AA.getModRefInfo(CallSites[i], const_cast<Value*>(Ptr), Size)
                    != AliasAnalysis::NoModRef)
@@ -170,9 +167,6 @@ bool AliasSet::aliasesCallSite(CallSite CS, AliasAnalysis &AA) const {
   if (AA.doesNotAccessMemory(CS))
     return false;
 
-  if (AA.hasNoModRefInfoForCalls())
-    return true;
-
   for (unsigned i = 0, e = CallSites.size(); i != e; ++i)
     if (AA.getModRefInfo(CallSites[i], CS) != AliasAnalysis::NoModRef ||
         AA.getModRefInfo(CS, CallSites[i]) != AliasAnalysis::NoModRef)
@@ -305,13 +299,6 @@ bool AliasSetTracker::add(VAArgInst *VAAI) {
 
 
 bool AliasSetTracker::add(CallSite CS) {
-  Instruction* Inst = CS.getInstruction();
-  if (isFreeCall(Inst)) {
-    bool NewPtr;
-    addPointer(Inst->getOperand(1), ~0, AliasSet::Mods, NewPtr);
-    return NewPtr;
-  }
-  
   if (isa<DbgInfoIntrinsic>(CS.getInstruction())) 
     return true; // Ignore DbgInfo Intrinsics.
   if (AA.doesNotAccessMemory(CS))
@@ -435,14 +422,6 @@ bool AliasSetTracker::remove(VAArgInst *VAAI) {
 }
 
 bool AliasSetTracker::remove(CallSite CS) {
-  Instruction* Inst = CS.getInstruction();
-  if (isFreeCall(Inst)) {
-    AliasSet *AS = findAliasSetForPointer(Inst->getOperand(1), ~0);
-    if (!AS) return false;
-    remove(*AS);
-    return true;
-  }
-
   if (AA.doesNotAccessMemory(CS))
     return false; // doesn't alias anything
 
@@ -571,8 +550,8 @@ void AliasSetTracker::print(raw_ostream &OS) const {
   OS << "\n";
 }
 
-void AliasSet::dump() const { print(errs()); }
-void AliasSetTracker::dump() const { print(errs()); }
+void AliasSet::dump() const { print(dbgs()); }
+void AliasSetTracker::dump() const { print(dbgs()); }
 
 //===----------------------------------------------------------------------===//
 //                     ASTCallbackVH Class Implementation