[llvm] r257649 - don't repeat function names in comments; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 11:01:43 PST 2016
Author: spatel
Date: Wed Jan 13 13:01:43 2016
New Revision: 257649
URL: http://llvm.org/viewvc/llvm-project?rev=257649&view=rev
Log:
don't repeat function names in comments; NFC
Modified:
llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
Modified: llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasSetTracker.h?rev=257649&r1=257648&r2=257649&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/AliasSetTracker.h (original)
+++ llvm/trunk/include/llvm/Analysis/AliasSetTracker.h Wed Jan 13 13:01:43 2016
@@ -7,9 +7,9 @@
//
//===----------------------------------------------------------------------===//
//
-// This file defines two classes: AliasSetTracker and AliasSet. These interface
+// This file defines two classes: AliasSetTracker and AliasSet. These interfaces
// are used to classify a collection of pointer references into a maximal number
-// of disjoint sets. Each AliasSet object constructed by the AliasSetTracker
+// of disjoint sets. Each AliasSet object constructed by the AliasSetTracker
// object refers to memory disjoint from the other sets.
//
//===----------------------------------------------------------------------===//
@@ -71,8 +71,8 @@ class AliasSet : public ilist_node<Alias
uint64_t getSize() const { return Size; }
- /// getAAInfo - Return the AAInfo, or null if there is no
- /// information or conflicting information.
+ /// Return the AAInfo, or null if there is no information or conflicting
+ /// information.
AAMDNodes getAAInfo() const {
// If we have missing or conflicting AAInfo, return null.
if (AAInfo == DenseMapInfo<AAMDNodes>::getEmptyKey() ||
@@ -111,11 +111,11 @@ class AliasSet : public ilist_node<Alias
PointerRec *PtrList, **PtrListEnd; // Doubly linked list of nodes.
AliasSet *Forward; // Forwarding pointer.
- // All instructions without a specific address in this alias set.
+ /// All instructions without a specific address in this alias set.
std::vector<AssertingVH<Instruction> > UnknownInsts;
- // RefCount - Number of nodes pointing to this AliasSet plus the number of
- // AliasSets forwarding to it.
+ /// Number of nodes pointing to this AliasSet plus the number of AliasSets
+ /// forwarding to it.
unsigned RefCount : 28;
/// The kinds of access this alias set models.
@@ -143,7 +143,7 @@ class AliasSet : public ilist_node<Alias
};
unsigned Alias : 1;
- // Volatile - True if this alias set contains volatile loads or stores.
+ /// True if this alias set contains volatile loads or stores.
bool Volatile : 1;
void addRef() { ++RefCount; }
@@ -165,20 +165,18 @@ public:
bool isMustAlias() const { return Alias == SetMustAlias; }
bool isMayAlias() const { return Alias == SetMayAlias; }
- // isVolatile - Return true if this alias set contains volatile loads or
- // stores.
+ /// 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.
+ /// 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...
- ///
+ /// Merge the specified alias set into this alias set.
void mergeSetIn(AliasSet &AS, AliasSetTracker &AST);
- // Alias Set iteration - Allow access to all of the pointer which are part of
- // this alias set...
+ // Alias Set iteration - Allow access to all of the pointers which are part of
+ // this alias set.
class iterator;
iterator begin() const { return iterator(PtrList); }
iterator end() const { return iterator(); }
@@ -236,9 +234,9 @@ private:
return PtrList;
}
- /// getForwardedTarget - Return the real alias set this represents. If this
- /// has been merged with another set and is forwarding, return the ultimate
- /// destination set. This also implements the union-find collapsing as well.
+ /// Return the real alias set this represents. If this has been merged with
+ /// another set and is forwarding, return the ultimate destination set. This
+ /// also implements the union-find collapsing as well.
AliasSet *getForwardedTarget(AliasSetTracker &AST) {
if (!Forward) return this;
@@ -271,9 +269,8 @@ private:
void setVolatile() { Volatile = true; }
public:
- /// aliasesPointer - Return true if the specified pointer "may" (or must)
- /// alias one of the members in the set.
- ///
+ /// Return true if the specified pointer "may" (or must) alias one of the
+ /// members in the set.
bool aliasesPointer(const Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo,
AliasAnalysis &AA) const;
bool aliasesUnknownInst(const Instruction *Inst, AliasAnalysis &AA) const;
@@ -285,8 +282,8 @@ inline raw_ostream& operator<<(raw_ostre
}
class AliasSetTracker {
- /// CallbackVH - A CallbackVH to arrange for AliasSetTracker to be
- /// notified whenever a Value is deleted.
+ /// A CallbackVH to arrange for AliasSetTracker to be notified whenever a
+ /// Value is deleted.
class ASTCallbackVH final : public CallbackVH {
AliasSetTracker *AST;
void deleted() override;
@@ -296,8 +293,8 @@ class AliasSetTracker {
ASTCallbackVH(Value *V, AliasSetTracker *AST = nullptr);
ASTCallbackVH &operator=(Value *V);
};
- /// ASTCallbackVHDenseMapInfo - Traits to tell DenseMap that tell us how to
- /// compare and hash the value handle.
+ /// Traits to tell DenseMap that tell us how to compare and hash the value
+ /// handle.
struct ASTCallbackVHDenseMapInfo : public DenseMapInfo<Value *> {};
AliasAnalysis &AA;
@@ -311,15 +308,14 @@ class AliasSetTracker {
PointerMapType PointerMap;
public:
- /// AliasSetTracker ctor - Create an empty collection of AliasSets, and use
- /// the specified alias analysis object to disambiguate load and store
- /// addresses.
+ /// Create an empty collection of AliasSets, and use the specified alias
+ /// analysis object to disambiguate load and store addresses.
explicit AliasSetTracker(AliasAnalysis &aa) : AA(aa) {}
~AliasSetTracker() { clear(); }
- /// add methods - These methods are used to add different types of
- /// instructions to the alias sets. Adding a new instruction can result in
- /// one of three actions happening:
+ /// These methods are used to add different types of instructions to the alias
+ /// sets. Adding a new instruction can result in one of three actions
+ /// happening:
///
/// 1. If the instruction doesn't alias any other sets, create a new set.
/// 2. If the instruction aliases exactly one set, add it to the set
@@ -338,10 +334,9 @@ public:
void add(const AliasSetTracker &AST); // Add alias relations from another AST
bool addUnknown(Instruction *I);
- /// remove methods - These methods are used to remove all entries that might
- /// be aliased by the specified instruction. These methods return true if any
- /// alias sets were eliminated.
- // Remove a location
+ /// These methods are used to remove all entries that might be aliased by the
+ /// specified instruction. These methods return true if any alias sets were
+ /// eliminated.
bool remove(Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo);
bool remove(LoadInst *LI);
bool remove(StoreInst *SI);
@@ -352,28 +347,26 @@ public:
void clear();
- /// getAliasSets - Return the alias sets that are active.
- ///
+ /// Return the alias sets that are active.
const ilist<AliasSet> &getAliasSets() const { return AliasSets; }
- /// getAliasSetForPointer - Return the alias set that the specified pointer
- /// lives in. If the New argument is non-null, this method sets the value to
- /// true if a new alias set is created to contain the pointer (because the
- /// pointer didn't alias anything).
+ /// Return the alias set that the specified pointer lives in. If the New
+ /// argument is non-null, this method sets the value to true if a new alias
+ /// set is created to contain the pointer (because the pointer didn't alias
+ /// anything).
AliasSet &getAliasSetForPointer(Value *P, uint64_t Size,
const AAMDNodes &AAInfo,
bool *New = nullptr);
- /// getAliasSetForPointerIfExists - Return the alias set containing the
- /// location specified if one exists, otherwise return null.
+ /// Return the alias set containing the location specified if one exists,
+ /// otherwise return null.
AliasSet *getAliasSetForPointerIfExists(const Value *P, uint64_t Size,
const AAMDNodes &AAInfo) {
return findAliasSetForPointer(P, Size, AAInfo);
}
- /// containsPointer - Return true if the specified location is represented by
- /// this alias set, false otherwise. This does not modify the AST object or
- /// alias sets.
+ /// Return true if the specified location is represented by this alias set,
+ /// false otherwise. This does not modify the AST object or alias sets.
bool containsPointer(const Value *P, uint64_t Size,
const AAMDNodes &AAInfo) const;
@@ -381,23 +374,19 @@ public:
/// members in any of the sets.
bool containsUnknown(const Instruction *I) const;
- /// getAliasAnalysis - Return the underlying alias analysis object used by
- /// this tracker.
+ /// Return the underlying alias analysis object used by this tracker.
AliasAnalysis &getAliasAnalysis() const { return AA; }
- /// deleteValue method - This method is used to remove a pointer value from
- /// the AliasSetTracker entirely. It should be used when an instruction is
- /// deleted from the program to update the AST. If you don't use this, you
- /// would have dangling pointers to deleted instructions.
- ///
+ /// This method is used to remove a pointer value from the AliasSetTracker
+ /// entirely. It should be used when an instruction is deleted from the
+ /// program to update the AST. If you don't use this, you would have dangling
+ /// pointers to deleted instructions.
void deleteValue(Value *PtrVal);
- /// copyValue - This method should be used whenever a preexisting value in the
- /// program is copied or cloned, introducing a new value. Note that it is ok
- /// for clients that use this method to introduce the same value multiple
- /// times: if the tracker already knows about a value, it will ignore the
- /// request.
- ///
+ /// This method should be used whenever a preexisting value in the program is
+ /// copied or cloned, introducing a new value. Note that it is ok for clients
+ /// that use this method to introduce the same value multiple times: if the
+ /// tracker already knows about a value, it will ignore the request.
void copyValue(Value *From, Value *To);
typedef ilist<AliasSet>::iterator iterator;
@@ -416,8 +405,8 @@ private:
friend class AliasSet;
void removeAliasSet(AliasSet *AS);
- // getEntryFor - Just like operator[] on the map, except that it creates an
- // entry for the pointer if it doesn't already exist.
+ /// Just like operator[] on the map, except that it creates an entry for the
+ /// pointer if it doesn't already exist.
AliasSet::PointerRec &getEntryFor(Value *V) {
AliasSet::PointerRec *&Entry = PointerMap[ASTCallbackVH(V, this)];
if (!Entry)
More information about the llvm-commits
mailing list