diff options
author | Owen Anderson <resistor@mac.com> | 2007-06-05 17:31:23 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-06-05 17:31:23 +0000 |
commit | 359208032b7d0736307b375c36f5c5ab4461ac87 (patch) | |
tree | 78ad7cb4eb3384e3a665a6af1519e374350c158f | |
parent | d8af90c1da64b81a7aa167b5adcc1e81b0741252 (diff) |
Fix a small bug, some 80 cols violations, and add some more debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37436 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/GVNPRE.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp index 2bedd1cdea..b34239d6a6 100644 --- a/lib/Transforms/Scalar/GVNPRE.cpp +++ b/lib/Transforms/Scalar/GVNPRE.cpp @@ -354,6 +354,10 @@ bool GVNPRE::runOnFunction(Function &F) { currTemps, currAvail, availableOut); } + DOUT << "Maximal Set: "; + dump_unique(VN, maximalSet); + DOUT << "\n"; + PostDominatorTree &PDT = getAnalysis<PostDominatorTree>(); // Second Phase of BuildSets - calculate ANTIC_IN @@ -384,10 +388,12 @@ bool GVNPRE::runOnFunction(Function &F) { std::set<Value*, ExprLT> old (anticIn.begin(), anticIn.end()); if (BB->getTerminator()->getNumSuccessors() == 1) { - if (visited.find(BB) == visited.end()) + if (visited.find(BB->getTerminator()->getSuccessor(0)) == + visited.end()) phi_translate_set(VN, maximalSet, maximalSet, BB, anticOut); else - phi_translate_set(VN, maximalSet, anticipatedIn[BB->getTerminator()->getSuccessor(0)], BB, anticOut); + phi_translate_set(VN, maximalSet, + anticipatedIn[BB->getTerminator()->getSuccessor(0)], BB, anticOut); } else if (BB->getTerminator()->getNumSuccessors() > 1) { BasicBlock* first = BB->getTerminator()->getSuccessor(0); anticOut.insert(anticipatedIn[first].begin(), |