diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-09-30 00:47:20 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-09-30 00:47:20 +0000 | 
| commit | 18a9273e618895eb6c4b762adfc291268a30960c (patch) | |
| tree | cf27491e14c12848cc1809957c5ed7c4ea73d2d0 /llvm/lib/Analysis | |
| parent | 0886d252d704d27aab4d1b066764780edf957e44 (diff) | |
| download | bcm5719-llvm-18a9273e618895eb6c4b762adfc291268a30960c.tar.gz bcm5719-llvm-18a9273e618895eb6c4b762adfc291268a30960c.zip | |
Add a new DenseSet abstraction.
llvm-svn: 42474
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/IPA/Andersens.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index b6cb8f8f15b..e20be6bcc27 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/lib/Analysis/IPA/Andersens.cpp @@ -65,7 +65,7 @@  #include "llvm/Support/Debug.h"  #include "llvm/ADT/Statistic.h"  #include "llvm/ADT/SparseBitVector.h" -#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/DenseSet.h"  #include <algorithm>  #include <set>  #include <list> @@ -1773,7 +1773,7 @@ void Andersens::HUValNum(unsigned NodeIndex) {  /// replaced by their the pointer equivalence class representative.  void Andersens::RewriteConstraints() {    std::vector<Constraint> NewConstraints; -  DenseMap<Constraint, bool, ConstraintKeyInfo> Seen; +  DenseSet<Constraint, ConstraintKeyInfo> Seen;    PEClass2Node.clear();    PENLEClass2Node.clear(); @@ -1811,10 +1811,10 @@ void Andersens::RewriteConstraints() {      C.Src = FindEquivalentNode(RHSNode, RHSLabel);      C.Dest = FindEquivalentNode(FindNode(LHSNode), LHSLabel);      if (C.Src == C.Dest && C.Type == Constraint::Copy -        || Seen[C] == true) +        || Seen.count(C))        continue; -    Seen[C] = true; +    Seen.insert(C);      NewConstraints.push_back(C);    }    Constraints.swap(NewConstraints); | 

