Switch the internal "Info" map from an std::map to a DenseMap. This
[oota-llvm.git] / include / llvm / Analysis / AliasSetTracker.h
index e7d1cb3d2ec5e0cadad3b098e77ac31563bd713f..cd6450fac82656fdb25fea45adac615691ccdedf 100644 (file)
@@ -18,6 +18,7 @@
 #define LLVM_ANALYSIS_ALIASSETTRACKER_H
 
 #include "llvm/Support/CallSite.h"
+#include "llvm/Support/Streams.h"
 #include "llvm/ADT/iterator"
 #include "llvm/ADT/hash_map"
 #include "llvm/ADT/ilist"
@@ -156,6 +157,7 @@ public:
   bool empty() const { return PtrList == 0; }
 
   void print(std::ostream &OS) const;
+  void print(std::ostream *OS) const { if (OS) print(*OS); }
   void dump() const;
 
   /// Define an iterator for alias sets... this is just a forward iterator.
@@ -228,6 +230,13 @@ private:
   void addPointer(AliasSetTracker &AST, HashNodePair &Entry, unsigned Size,
                   bool KnownMustAlias = false);
   void addCallSite(CallSite CS, AliasAnalysis &AA);
+  void removeCallSite(CallSite CS) {
+    for (unsigned i = 0, e = CallSites.size(); i != e; ++i)
+      if (CallSites[i].getInstruction() == CS.getInstruction()) {
+        CallSites[i] = CallSites.back();
+        CallSites.pop_back();
+      }
+  }
   void setVolatile() { Volatile = true; }
 
   /// aliasesPointer - Return true if the specified pointer "may" (or must)
@@ -347,6 +356,7 @@ public:
   iterator end()   { return AliasSets.end(); }
 
   void print(std::ostream &OS) const;
+  void print(std::ostream *OS) const { if (OS) print(*OS); }
   void dump() const;
 
 private: