[cfe-dev] Ownership of Stmts and Exprs, and destroying them
Chris Lattner
clattner at apple.com
Tue Nov 25 10:49:03 PST 2008
On Nov 25, 2008, at 2:16 AM, Sebastian Redl wrote:
> Sebastian Redl wrote:
>> On Mon, 24 Nov 2008 14:24:57 -0800, Chris Lattner
>> <clattner at apple.com>
>> wrote:
>>
>>> Ok, I guess I'm asking if there are cases in the parser that will
>>> use this class, that aren't currently using a size of ~16. Have
>>> you seen any cases like that?
>>>
>>
>> Yes. There are three or four instances of the size 4 (e.g. parsing
>> extended
>> ASM decls), and one or two of the size 8 (can't remember where).
>>
> Correction: 8 is the dominant size, being the size of ExprListTy and
> used in some other places. There's also 12. I haven't seen 16
> anywhere.
Ok, it would be fine to just go with 8 or 12 then. It's all pretty
arbitrary :)
The major key is for SmallVectors to live on the stack (where space is
relatively free). We don't want them to end up on the heap (i.e.,
'new' a SmallVector).
-Chris
More information about the cfe-dev
mailing list