Chris convinced me that the default size of the SmallVector (2) was too
authorReid Spencer <rspencer@reidspencer.com>
Mon, 9 Apr 2007 01:53:54 +0000 (01:53 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 9 Apr 2007 01:53:54 +0000 (01:53 +0000)
small.  Since it doesn't cost much to have 2 more (8 bytes), but not having
them would require a malloc as soon as the third one is needed. Setting
the default to 4 delays the malloc until the 5th parameter attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35793 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ParameterAttributes.h

index 30bead70933712c60cd8ed1878b09a1bb72bb498..e1c2844bfebe1438ccc95844675425b2ed5cb780 100644 (file)
@@ -156,7 +156,7 @@ class ParamAttrsList {
       uint16_t index; ///< Index of the parameter for which the attributes apply
     };
 
-    SmallVector<ParamAttrsWithIndex,2> attrs; ///< The list of attributes
+    SmallVector<ParamAttrsWithIndex,4> attrs; ///< The list of attributes
   /// @}
 };