From: Chris Lattner Date: Thu, 13 Feb 2003 19:46:22 +0000 (+0000) Subject: This speeds up processing LLVM a _lot_, 17% in the case of loading and destroying... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0779388ff830e0636f3071e70546e33d3b645f54;p=oota-llvm.git This speeds up processing LLVM a _lot_, 17% in the case of loading and destroying "vortex" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5553 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index f343a6c1551..ac13159e30a 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -89,7 +89,8 @@ void Value::killUse(User *U) { /* empty */; assert(i < Uses.size() && "Use not in uses list!!"); - Uses.erase(Uses.begin()+i); + Uses[i] = Uses.back(); + Uses.pop_back(); } //===----------------------------------------------------------------------===//