projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76d708b
)
small speedup in the case where a smallvector is default ctor'd from
author
Chris Lattner
<sabre@nondot.org>
Fri, 10 Aug 2007 06:54:38 +0000
(06:54 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 10 Aug 2007 06:54:38 +0000
(06:54 +0000)
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
include/llvm/ADT/SmallVector.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SmallVector.h
b/include/llvm/ADT/SmallVector.h
index 876ca27fec72e62d1df8fd00e3ede1896046228c..1c970a55981c471d8a3b7a1d289bd1c32bc6ea34 100644
(file)
--- a/
include/llvm/ADT/SmallVector.h
+++ b/
include/llvm/ADT/SmallVector.h
@@
-455,7
+455,8
@@
public:
}
SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(NumTsAvailable) {
- operator=(RHS);
+ if (!RHS.empty())
+ operator=(RHS);
}
const SmallVector &operator=(const SmallVector &RHS) {