[llvm-commits] CVS: llvm/include/llvm/Analysis/AliasSetTracker.h

Chris Lattner lattner at cs.uiuc.edu
Mon Mar 3 17:29:01 PST 2003


Changes in directory llvm/include/llvm/Analysis:

AliasSetTracker.h updated: 1.3 -> 1.4

---
Log message:

Add a few new 'add' methods.  Move the iterator around


---
Diffs of the changes:

Index: llvm/include/llvm/Analysis/AliasSetTracker.h
diff -u llvm/include/llvm/Analysis/AliasSetTracker.h:1.3 llvm/include/llvm/Analysis/AliasSetTracker.h:1.4
--- llvm/include/llvm/Analysis/AliasSetTracker.h:1.3	Wed Feb 26 16:10:55 2003
+++ llvm/include/llvm/Analysis/AliasSetTracker.h	Mon Mar  3 17:27:52 2003
@@ -93,6 +93,36 @@
   };
   unsigned AliasTy : 1;
 
+  friend class ilist_traits<AliasSet>;
+  AliasSet *getPrev() const { return Prev; }
+  AliasSet *getNext() const { return Next; }
+  void setPrev(AliasSet *P) { Prev = P; }
+  void setNext(AliasSet *N) { Next = N; }
+
+public:
+  /// Accessors...
+  bool isRef() const { return AccessTy & Refs; }
+  bool isMod() const { return AccessTy & Mods; }
+  bool isMustAlias() const { return AliasTy == MustAlias; }
+  bool isMayAlias()  const { return AliasTy == MayAlias; }
+
+  /// isForwardingAliasSet - Return true if this alias set should be ignored as
+  /// part of the AliasSetTracker object.
+  bool isForwardingAliasSet() const { return Forward; }
+
+  /// mergeSetIn - Merge the specified alias set into this alias set...
+  ///
+  void mergeSetIn(AliasSet &AS);
+
+  // Alias Set iteration - Allow access to all of the pointer which are part of
+  // this alias set...
+  class iterator;
+  iterator begin() const { return iterator(PtrListHead); }
+  iterator end()   const { return iterator(); }
+
+  void print(std::ostream &OS) const;
+  void dump() const;
+
   /// Define an iterator for alias sets... this is just a forward iterator.
   class iterator : public forward_iterator<HashNodePair, ptrdiff_t> {
     HashNodePair *CurNode;
@@ -125,31 +155,6 @@
     }
   };
 
-  friend class ilist_traits<AliasSet>;
-  AliasSet *getPrev() const { return Prev; }
-  AliasSet *getNext() const { return Next; }
-  void setPrev(AliasSet *P) { Prev = P; }
-  void setNext(AliasSet *N) { Next = N; }
-
-public:
-  /// Accessors...
-  bool isRef() const { return AccessTy & Refs; }
-  bool isMod() const { return AccessTy & Mods; }
-  bool isMustAlias() const { return AliasTy == MustAlias; }
-  bool isMayAlias()  const { return AliasTy == MayAlias; }
-
-  /// mergeSetIn - Merge the specified alias set into this alias set...
-  ///
-  void mergeSetIn(AliasSet &AS);
-
-  // Alias Set iteration - Allow access to all of the pointer which are part of
-  // this alias set...
-  iterator begin() const { return iterator(PtrListHead); }
-  iterator end()   const { return iterator(); }
-
-  void print(std::ostream &OS) const;
-  void dump() const;
-
 private:
   // Can only be created by AliasSetTracker
   AliasSet() : PtrListHead(0), PtrListTail(0), Forward(0), RefCount(0),
@@ -216,10 +221,12 @@
   ///
   void add(LoadInst *LI);
   void add(StoreInst *SI);
-  void add(CallSite CS);       // Call/Invoke instructions
-  void add(CallInst *CI) { add(CallSite(CI)); }
+  void add(CallSite CS);          // Call/Invoke instructions
+  void add(CallInst *CI)   { add(CallSite(CI)); }
   void add(InvokeInst *II) { add(CallSite(II)); }
-  void add(Instruction *I);  // Dispatch to one of the other add methods...
+  void add(Instruction *I);       // Dispatch to one of the other add methods...
+  void add(BasicBlock &BB);       // Add all instructions in basic block
+  void add(const AliasSetTracker &AST); // Add alias relations from another AST
 
   /// getAliasSets - Return the alias sets that are active.
   const ilist<AliasSet> &getAliasSets() const { return AliasSets; }





More information about the llvm-commits mailing list