Makes sense.

Applied:

http://llvm.org/viewvc/llvm-project?view=rev&revision=113799

On Sep 13, 2010, at 2:38 PM, Marcin Świderski wrote:

> W dniu 13 września 2010 23:17 użytkownik Ted Kremenek <[email protected]> 
> napisał:
> Hi Marcin,
> 
> If you think you will need to be using insert(), I'm dubious that a vector is 
> the right data structure.  Doing inserts repeatedly might wreck havoc on CFG 
> construction time.  What do you think?
> 
> On Sep 13, 2010, at 12:51 PM, Marcin Świderski wrote:
> 
> > Hi
> >
> > This is an implementation of insert method for BumpVector that is needed in 
> > my work on CFG.
> >
> > Cheers,
> > Marcin
> > <bump-vector-insert.patch>
> 
> I use insert for adding CFGElements for implicit destructors. The procedure 
> is as follows:
>  - count objects for destruction (time linear w.r.t. depth of local scopes),
>  - make room for those objects with batch insert of empty CFGElements,
>  - set proper values of destructors for inserted CFGElements.
> 
> This will cause data moving inside the vector only while back patching for 
> goto statements. In other cases this will only append data at the end of 
> vector, and can be optimized if will cause too much overhead. Currently I 
> would prefere to leave it this way.

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to