diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-13 19:46:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-13 19:46:22 +0000 |
commit | 0779388ff830e0636f3071e70546e33d3b645f54 (patch) | |
tree | f2a05c5e3b58e40bb1e1176c8df15ae3937254d3 /lib/VMCore/Value.cpp | |
parent | 731b2d7df57d4ca97e15b1136594f23055c083f7 (diff) | |
download | external_llvm-0779388ff830e0636f3071e70546e33d3b645f54.zip external_llvm-0779388ff830e0636f3071e70546e33d3b645f54.tar.gz external_llvm-0779388ff830e0636f3071e70546e33d3b645f54.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r-- | lib/VMCore/Value.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index f343a6c..ac13159 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(); } //===----------------------------------------------------------------------===// |