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

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 3 20:55:01 PST 2002


Changes in directory llvm/lib/Transforms/Scalar:

SCCP.cpp updated: 1.63 -> 1.64

---
Log message:

Make sure to _delete_ memory allocated by worklists


---
Diffs of the changes:

Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.63 llvm/lib/Transforms/Scalar/SCCP.cpp:1.64
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.63	Tue Oct 29 17:03:20 2002
+++ llvm/lib/Transforms/Scalar/SCCP.cpp	Sun Nov  3 20:54:22 2002
@@ -314,6 +314,8 @@
   // Reset state so that the next invocation will have empty data structures
   BBExecutable.clear();
   ValueState.clear();
+  std::vector<Instruction*>().swap(InstWorkList);
+  std::vector<BasicBlock*>().swap(BBWorkList);
 
   return MadeChanges;
 }





More information about the llvm-commits mailing list