[llvm-commits] CVS: llvm/lib/VMCore/Value.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 13 13:47:01 PST 2003


Changes in directory llvm/lib/VMCore:

Value.cpp updated: 1.30 -> 1.31

---
Log message:

This speeds up processing LLVM a _lot_, 17% in the case of loading and destroying "vortex"


---
Diffs of the changes:

Index: llvm/lib/VMCore/Value.cpp
diff -u llvm/lib/VMCore/Value.cpp:1.30 llvm/lib/VMCore/Value.cpp:1.31
--- llvm/lib/VMCore/Value.cpp:1.30	Wed Oct  9 18:12:59 2002
+++ llvm/lib/VMCore/Value.cpp	Thu Feb 13 13:46:22 2003
@@ -89,7 +89,8 @@
     /* empty */;
 
   assert(i < Uses.size() && "Use not in uses list!!");
-  Uses.erase(Uses.begin()+i);
+  Uses[i] = Uses.back();
+  Uses.pop_back();
 }
 
 //===----------------------------------------------------------------------===//





More information about the llvm-commits mailing list