[llvm-commits] CVS: llvm/lib/Transforms/Utils/DemoteRegToStack.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 15 11:43:02 PDT 2003


Changes in directory llvm/lib/Transforms/Utils:

DemoteRegToStack.cpp updated: 1.3 -> 1.4

---
Log message:

Cleanup


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

Index: llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
diff -u llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.3 llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.4
--- llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.3	Sat Sep 20 09:36:23 2003
+++ llvm/lib/Transforms/Utils/DemoteRegToStack.cpp	Wed Oct 15 11:42:21 2003
@@ -122,11 +122,8 @@
 }
 
 static void DeletePhis(PhiSet& phisToGo) {
-  for (PhiSetIterator PI=phisToGo.begin(), PE=phisToGo.end(); PI != PE; ++PI) {
-    assert((*PI)->use_size() == 0 && "This PHI should be DEAD!");
-    (*PI)->getParent()->getInstList().remove(*PI);
-    delete *PI;
-  }
+  for (PhiSetIterator PI = phisToGo.begin(), PE =phisToGo.end(); PI != PE; ++PI)
+    (*PI)->getParent()->getInstList().erase(*PI);
   phisToGo.clear();
 }
 





More information about the llvm-commits mailing list