// RefCount - Number of nodes pointing to this AliasSet plus the number of
// AliasSets forwarding to it.
// RefCount - Number of nodes pointing to this AliasSet plus the number of
// AliasSets forwarding to it.
- unsigned RefCount : 29;
+ unsigned RefCount : 28;
/// AccessType - Keep track of whether this alias set merely refers to the
/// locations of memory, whether it modifies the memory, or whether it does
/// AccessType - Keep track of whether this alias set merely refers to the
/// locations of memory, whether it modifies the memory, or whether it does
+ // Volatile - True if this alias set contains volatile loads or stores.
+ bool Volatile : 1;
+
friend class ilist_traits<AliasSet>;
AliasSet *getPrev() const { return Prev; }
AliasSet *getNext() const { return Next; }
friend class ilist_traits<AliasSet>;
AliasSet *getPrev() const { return Prev; }
AliasSet *getNext() const { return Next; }
bool isMustAlias() const { return AliasTy == MustAlias; }
bool isMayAlias() const { return AliasTy == MayAlias; }
bool isMustAlias() const { return AliasTy == MustAlias; }
bool isMayAlias() const { return AliasTy == MayAlias; }
+ // isVolatile - Return true if this alias set contains volatile loads or
+ // stores.
+ bool isVolatile() const { return Volatile; }
+
+
/// isForwardingAliasSet - Return true if this alias set should be ignored as
/// part of the AliasSetTracker object.
bool isForwardingAliasSet() const { return Forward; }
/// isForwardingAliasSet - Return true if this alias set should be ignored as
/// part of the AliasSetTracker object.
bool isForwardingAliasSet() const { return Forward; }
private:
// Can only be created by AliasSetTracker
AliasSet() : PtrListHead(0), PtrListTail(0), Forward(0), RefCount(0),
private:
// Can only be created by AliasSetTracker
AliasSet() : PtrListHead(0), PtrListTail(0), Forward(0), RefCount(0),
- AccessTy(NoModRef), AliasTy(MustAlias) {
+ AccessTy(NoModRef), AliasTy(MustAlias), Volatile(false) {
}
HashNodePair *getSomePointer() const {
return PtrListHead ? PtrListHead : 0;
}
HashNodePair *getSomePointer() const {
return PtrListHead ? PtrListHead : 0;
void addPointer(AliasSetTracker &AST, HashNodePair &Entry, unsigned Size);
void addCallSite(CallSite CS);
void addPointer(AliasSetTracker &AST, HashNodePair &Entry, unsigned Size);
void addCallSite(CallSite CS);
+ void setVolatile() { Volatile = true; }
/// aliasesPointer - Return true if the specified pointer "may" (or must)
/// alias one of the members in the set.
/// aliasesPointer - Return true if the specified pointer "may" (or must)
/// alias one of the members in the set.
AliasSet::PointerRec())).first;
}
AliasSet::PointerRec())).first;
}
- void addPointer(Value *P, unsigned Size, AliasSet::AccessType E) {
+ AliasSet &addPointer(Value *P, unsigned Size, AliasSet::AccessType E) {
AliasSet &AS = getAliasSetForPointer(P, Size);
AS.AccessTy |= E;
AliasSet &AS = getAliasSetForPointer(P, Size);
AS.AccessTy |= E;
}
AliasSet *findAliasSetForPointer(const Value *Ptr, unsigned Size);
}
AliasSet *findAliasSetForPointer(const Value *Ptr, unsigned Size);