X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fllvm%2FAnalysis%2FAliasSetTracker.h;h=37fd69b081ccb604d30bbb1f98be51ac0b6db2cb;hb=2b762697564ca1e12e0e974e93ceeb4c3420505c;hp=5adfb4f74d63f3b1251987cac38d2097977d38a0;hpb=9146833fa313fb0339355f9ca8b63122dd73ba88;p=oota-llvm.git diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index 5adfb4f74d6..37fd69b081c 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -42,13 +42,14 @@ class AliasSet : public ilist_node { AliasSet *AS; uint64_t Size; AAMDNodes AAInfo; + public: PointerRec(Value *V) : Val(V), PrevInList(nullptr), NextInList(nullptr), AS(nullptr), Size(0), AAInfo(DenseMapInfo::getEmptyKey()) {} Value *getValue() const { return Val; } - + PointerRec *getNext() const { return NextInList; } bool hasAliasSet() const { return AS != nullptr; } @@ -156,7 +157,7 @@ class AliasSet : public ilist_node { assert(i < UnknownInsts.size()); return UnknownInsts[i]; } - + public: /// Accessors... bool isRef() const { return Access & RefAccess; } @@ -190,6 +191,7 @@ public: class iterator : public std::iterator { PointerRec *CurNode; + public: explicit iterator(PointerRec *CN = nullptr) : CurNode(CN) {} @@ -282,7 +284,6 @@ inline raw_ostream& operator<<(raw_ostream &OS, const AliasSet &AS) { return OS; } - class AliasSetTracker { /// CallbackVH - A CallbackVH to arrange for AliasSetTracker to be /// notified whenever a Value is deleted. @@ -290,6 +291,7 @@ class AliasSetTracker { AliasSetTracker *AST; void deleted() override; void allUsesReplacedWith(Value *) override; + public: ASTCallbackVH(Value *V, AliasSetTracker *AST = nullptr); ASTCallbackVH &operator=(Value *V); @@ -347,7 +349,7 @@ public: bool remove(Instruction *I); void remove(AliasSet &AS); bool removeUnknown(Instruction *I); - + void clear(); /// getAliasSets - Return the alias sets that are active. @@ -398,7 +400,6 @@ public: /// void copyValue(Value *From, Value *To); - typedef ilist::iterator iterator; typedef ilist::const_iterator const_iterator;