[llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp

Owen Anderson resistor at mac.com
Tue May 29 17:36:10 CDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

GVNPRE.cpp updated: 1.1 -> 1.2
---
Log message:

Add a place where I missed using the maximal set.  Note that using the maximal
set this way is _SLOW_.  Somewhere down the line, I'll look at speeding it up.


---
Diffs of the changes:  (+3 -3)

 GVNPRE.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp
diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.1 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.2
--- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.1	Tue May 29 16:53:49 2007
+++ llvm/lib/Transforms/Scalar/GVNPRE.cpp	Tue May 29 17:35:41 2007
@@ -390,7 +390,7 @@
       std::set<Expression> old (anticIn.begin(), anticIn.end());
       
       if (BB->getTerminator()->getNumSuccessors() == 1) {
-         phi_translate(VN, anticIn, BB, anticOut);
+         phi_translate(VN, maximalSet, BB, anticOut);
       } else if (BB->getTerminator()->getNumSuccessors() > 1) {
         for (unsigned i = 0; i < BB->getTerminator()->getNumSuccessors(); ++i) {
           BasicBlock* currSucc = BB->getTerminator()->getSuccessor(i);
@@ -439,7 +439,7 @@
     iterations++;
   }
   
-  /* printf("Iterations: %d\n", iterations);
+  printf("Iterations: %d\n", iterations);
   
   for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
     printf("Name: ");
@@ -453,7 +453,7 @@
     printf("\nANTIC_IN: \n");
     dump(VN, anticipatedIn[I]);
     printf("\n");
-  } */
+  }
   
   return false;
 }






More information about the llvm-commits mailing list