From: Chris Lattner Date: Fri, 10 Aug 2007 06:54:38 +0000 (+0000) Subject: small speedup in the case where a smallvector is default ctor'd from X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02cee38647ea413e5d05f29f67a7f003db9f0081;p=oota-llvm.git small speedup in the case where a smallvector is default ctor'd from an empty vector. This speeds up llc slightly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40983 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 876ca27fec7..1c970a55981 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -455,7 +455,8 @@ public: } SmallVector(const SmallVector &RHS) : SmallVectorImpl(NumTsAvailable) { - operator=(RHS); + if (!RHS.empty()) + operator=(RHS); } const SmallVector &operator=(const SmallVector &RHS) {