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

Chris Lattner lattner at cs.uiuc.edu
Sat Apr 10 17:35:01 PDT 2004


Changes in directory llvm/lib/Transforms/Scalar:

GCSE.cpp updated: 1.37 -> 1.38

---
Log message:

Update the value numbering interface.


---
Diffs of the changes:  (+4 -1)

Index: llvm/lib/Transforms/Scalar/GCSE.cpp
diff -u llvm/lib/Transforms/Scalar/GCSE.cpp:1.37 llvm/lib/Transforms/Scalar/GCSE.cpp:1.38
--- llvm/lib/Transforms/Scalar/GCSE.cpp:1.37	Sat Apr 10 16:11:11 2004
+++ llvm/lib/Transforms/Scalar/GCSE.cpp	Sat Apr 10 17:33:34 2004
@@ -160,11 +160,14 @@
     ++NumCallRemoved; // Keep track of calls eliminated
   ++NumInstRemoved;   // Keep track of number of insts eliminated
 
+  // Update value numbering
+  getAnalysis<ValueNumbering>().deleteInstruction(I);
+
   // If we are not replacing the instruction with a constant, we cannot do
   // anything special.
   if (!isa<Constant>(V)) {
     I->replaceAllUsesWith(V);
-
+    
     // Erase the instruction from the program.
     I->getParent()->getInstList().erase(I);
     return;





More information about the llvm-commits mailing list