diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2007-09-16 23:59:53 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@dberlin.org> | 2007-09-16 23:59:53 +0000 |
commit | c6d939818b7c50f6e14d04447657e670aedc3f6f (patch) | |
tree | b52e9ffe6d5aa1c4067e52d9892c10b0ea12a1b1 /lib/Analysis | |
parent | 7f44657c2f4409416a083a9e63d2b4ea7cdca43e (diff) | |
download | external_llvm-c6d939818b7c50f6e14d04447657e670aedc3f6f.zip external_llvm-c6d939818b7c50f6e14d04447657e670aedc3f6f.tar.gz external_llvm-c6d939818b7c50f6e14d04447657e670aedc3f6f.tar.bz2 |
Fix bug in andersen's related to test_and_set.
Add operator == and != to SparseBitVector.
Simplify code for test_and_set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/IPA/Andersens.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index fed2460..9a1ff56 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -1212,10 +1212,9 @@ void Andersens::SolveConstraints() { } do { - Changed = false; - + Changed = false; ++NumIters; - DOUT << "Starting iteration #" << Iteration++ << "!\n"; + DOUT << "Starting iteration #" << Iteration++; // TODO: In the microoptimization category, we could just make Topo2Node // a fast map and thus only contain the visited nodes. for (unsigned i = 0; i < GraphNodes.size(); ++i) { @@ -1295,7 +1294,7 @@ void Andersens::SolveConstraints() { // Add an edge to the graph, so we can just do regular bitmap ior next // time. It may also let us notice a cycle. - if (!GraphNodes[*Src].Edges->test_and_set(*Dest)) { + if (GraphNodes[*Src].Edges->test_and_set(*Dest)) { if (GraphNodes[*Dest].PointsTo |= *(GraphNodes[*Src].PointsTo)) { GraphNodes[*Dest].Changed = true; // If we changed a node we've already processed, we need another |