[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 8 13:26:09 PDT 2004



Changes in directory llvm/lib/Transforms/IPO:

GlobalOpt.cpp updated: 1.13 -> 1.14
---
Log message:

We might as well delete the known-dead global sooner rather than later since
we know it is dead.


---
Diffs of the changes:  (+2 -0)

Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.13 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.14
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.13	Fri Oct  8 12:32:09 2004
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp	Fri Oct  8 15:25:55 2004
@@ -316,6 +316,8 @@
     CE->destroyConstant();
   }
 
+  // Delete the old global, now that it is dead.
+  Globals.erase(GV);
   ++NumSRA;
   return NewGlobals[0];
 }






More information about the llvm-commits mailing list